cel-tui
    Preparing search index...

    Interface SelectProps

    interface SelectProps {
        bgColor?: Color;
        fgColor?: Color;
        flex?: number;
        focusable?: boolean;
        focused?: boolean;
        focusStyle?: StyleProps;
        height?: SizeValue;
        highlightColor?: Color;
        indicator?: string;
        items: SelectItem[];
        maxVisible?: number;
        onBlur?: () => void;
        onFocus?: () => void;
        onKeyPress?: KeyPressHandler;
        onSelect: (value: string) => void;
        placeholder?: string;
        width?: SizeValue;
    }
    Index

    Properties

    bgColor?: Color

    Background color (fills the container rect).

    fgColor?: Color

    Foreground text color.

    flex?: number

    Flex grow factor.

    focusable?: boolean

    Whether the select participates in focus traversal.

    true
    
    focused?: boolean

    Whether the select is currently focused (controlled mode). When omitted, focus is uncontrolled (framework-managed).

    focusStyle?: StyleProps

    Style overrides applied when focused.

    height?: SizeValue

    Fixed height in cells or percentage.

    highlightColor?: Color

    Color of the highlighted item and its indicator.

    "color06"
    
    indicator?: string

    Character used for the highlight indicator.

    "›"
    
    items: SelectItem[]

    Items to choose from.

    maxVisible?: number

    Maximum number of items visible at once. When the filtered list exceeds this, a "N more" indicator is shown.

    10
    
    onBlur?: () => void

    Called when the select loses focus.

    onFocus?: () => void

    Called when the select receives focus.

    onKeyPress?: KeyPressHandler

    Called on key events that bubble up to the Select. Return false to keep bubbling to ancestors.

    The normalized semantic key string.

    onSelect: (value: string) => void

    Called when the user selects an item (Enter or click).

    Type Declaration

      • (value: string): void
      • Parameters

        • value: string

          The selected item's value.

        Returns void

    placeholder?: string

    Placeholder text shown when the search query is empty.

    "type to filter..."
    
    width?: SizeValue

    Fixed width in cells or percentage.