Backstage
    Preparing search index...

    Interface SelectProps<T>

    interface SelectProps<T extends "single" | "multiple"> {
        "aria-describedby"?: string;
        "aria-details"?: string;
        "aria-label"?: string;
        "aria-labelledby"?: string;
        autoComplete?: string;
        autoFocus?: boolean;
        children?: ChildrenOrFunction<SelectRenderProps>;
        className?: ClassNameOrFunction<SelectRenderProps>;
        defaultOpen?: boolean;
        defaultSelectedKey?: Key;
        defaultValue?: ValueType<T>;
        description?: string | null;
        dir?: string;
        disabledKeys?: Iterable<Key, any, any>;
        excludeFromTabOrder?: boolean;
        form?: string;
        hidden?: boolean;
        icon?: ReactNode;
        id?: string;
        inert?: boolean;
        isDisabled?: boolean;
        isInvalid?: boolean;
        isOpen?: boolean;
        isRequired?: boolean;
        label?: string | null;
        lang?: string;
        name?: string;
        onAnimationEnd?: AnimationEventHandler<HTMLDivElement>;
        onAnimationEndCapture?: AnimationEventHandler<HTMLDivElement>;
        onAnimationIteration?: AnimationEventHandler<HTMLDivElement>;
        onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement>;
        onAnimationStart?: AnimationEventHandler<HTMLDivElement>;
        onAnimationStartCapture?: AnimationEventHandler<HTMLDivElement>;
        onAuxClick?: MouseEventHandler<HTMLDivElement>;
        onAuxClickCapture?: MouseEventHandler<HTMLDivElement>;
        onBlur?: (e: FocusEvent<Element>) => void;
        onChange?: (value: ValueType) => void;
        onClick?: MouseEventHandler<HTMLDivElement>;
        onClickCapture?: MouseEventHandler<HTMLDivElement>;
        onContextMenu?: MouseEventHandler<HTMLDivElement>;
        onContextMenuCapture?: MouseEventHandler<HTMLDivElement>;
        onDoubleClick?: MouseEventHandler<HTMLDivElement>;
        onDoubleClickCapture?: MouseEventHandler<HTMLDivElement>;
        onFocus?: (e: FocusEvent<Element>) => void;
        onFocusChange?: (isFocused: boolean) => void;
        onGotPointerCapture?: PointerEventHandler<HTMLDivElement>;
        onGotPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>;
        onKeyDown?: (e: KeyboardEvent) => void;
        onKeyUp?: (e: KeyboardEvent) => void;
        onLostPointerCapture?: PointerEventHandler<HTMLDivElement>;
        onLostPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>;
        onMouseDown?: MouseEventHandler<HTMLDivElement>;
        onMouseDownCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseEnter?: MouseEventHandler<HTMLDivElement>;
        onMouseLeave?: MouseEventHandler<HTMLDivElement>;
        onMouseMove?: MouseEventHandler<HTMLDivElement>;
        onMouseMoveCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseOut?: MouseEventHandler<HTMLDivElement>;
        onMouseOutCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseOver?: MouseEventHandler<HTMLDivElement>;
        onMouseOverCapture?: MouseEventHandler<HTMLDivElement>;
        onMouseUp?: MouseEventHandler<HTMLDivElement>;
        onMouseUpCapture?: MouseEventHandler<HTMLDivElement>;
        onOpenChange?: (isOpen: boolean) => void;
        onPointerCancel?: PointerEventHandler<HTMLDivElement>;
        onPointerCancelCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerDown?: PointerEventHandler<HTMLDivElement>;
        onPointerDownCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerEnter?: PointerEventHandler<HTMLDivElement>;
        onPointerLeave?: PointerEventHandler<HTMLDivElement>;
        onPointerMove?: PointerEventHandler<HTMLDivElement>;
        onPointerMoveCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerOut?: PointerEventHandler<HTMLDivElement>;
        onPointerOutCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerOver?: PointerEventHandler<HTMLDivElement>;
        onPointerOverCapture?: PointerEventHandler<HTMLDivElement>;
        onPointerUp?: PointerEventHandler<HTMLDivElement>;
        onPointerUpCapture?: PointerEventHandler<HTMLDivElement>;
        onScroll?: UIEventHandler<HTMLDivElement>;
        onScrollCapture?: UIEventHandler<HTMLDivElement>;
        onSelectionChange?: (key: Key | null) => void;
        onTouchCancel?: TouchEventHandler<HTMLDivElement>;
        onTouchCancelCapture?: TouchEventHandler<HTMLDivElement>;
        onTouchEnd?: TouchEventHandler<HTMLDivElement>;
        onTouchEndCapture?: TouchEventHandler<HTMLDivElement>;
        onTouchMove?: TouchEventHandler<HTMLDivElement>;
        onTouchMoveCapture?: TouchEventHandler<HTMLDivElement>;
        onTouchStart?: TouchEventHandler<HTMLDivElement>;
        onTouchStartCapture?: TouchEventHandler<HTMLDivElement>;
        onTransitionCancel?: TransitionEventHandler<HTMLDivElement>;
        onTransitionCancelCapture?: TransitionEventHandler<HTMLDivElement>;
        onTransitionEnd?: TransitionEventHandler<HTMLDivElement>;
        onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement>;
        onTransitionRun?: TransitionEventHandler<HTMLDivElement>;
        onTransitionRunCapture?: TransitionEventHandler<HTMLDivElement>;
        onTransitionStart?: TransitionEventHandler<HTMLDivElement>;
        onTransitionStartCapture?: TransitionEventHandler<HTMLDivElement>;
        onWheel?: WheelEventHandler<HTMLDivElement>;
        onWheelCapture?: WheelEventHandler<HTMLDivElement>;
        options?: Option[];
        placeholder?: string;
        searchable?: boolean;
        searchPlaceholder?: string;
        secondaryLabel?: string | null;
        selectedKey?: Key | null;
        selectionMode?: T;
        size?: "small" | "medium" | Partial<Record<Breakpoint, "small" | "medium">>;
        slot?: string | null;
        style?: StyleOrFunction<SelectRenderProps>;
        translate?: "yes" | "no";
        validate?: (
            value: ValidationType,
        ) => true | ValidationError | null | undefined;
        validationBehavior?: "native" | "aria";
        value?: ValueType<T>;
    }

    Type Parameters

    • T extends "single" | "multiple"

    Hierarchy

    Index

    Properties

    aria-describedby? aria-details? aria-label? aria-labelledby? autoComplete? autoFocus? children? className? defaultOpen? defaultSelectedKey? defaultValue? description? dir? disabledKeys? excludeFromTabOrder? form? hidden? icon? id? inert? isDisabled? isInvalid? isOpen? isRequired? label? lang? name? onAnimationEnd? onAnimationEndCapture? onAnimationIteration? onAnimationIterationCapture? onAnimationStart? onAnimationStartCapture? onAuxClick? onAuxClickCapture? onBlur? onChange? onClick? onClickCapture? onContextMenu? onContextMenuCapture? onDoubleClick? onDoubleClickCapture? onFocus? onFocusChange? onGotPointerCapture? onGotPointerCaptureCapture? onKeyDown? onKeyUp? onLostPointerCapture? onLostPointerCaptureCapture? onMouseDown? onMouseDownCapture? onMouseEnter? onMouseLeave? onMouseMove? onMouseMoveCapture? onMouseOut? onMouseOutCapture? onMouseOver? onMouseOverCapture? onMouseUp? onMouseUpCapture? onOpenChange? onPointerCancel? onPointerCancelCapture? onPointerDown? onPointerDownCapture? onPointerEnter? onPointerLeave? onPointerMove? onPointerMoveCapture? onPointerOut? onPointerOutCapture? onPointerOver? onPointerOverCapture? onPointerUp? onPointerUpCapture? onScroll? onScrollCapture? onSelectionChange? onTouchCancel? onTouchCancelCapture? onTouchEnd? onTouchEndCapture? onTouchMove? onTouchMoveCapture? onTouchStart? onTouchStartCapture? onTransitionCancel? onTransitionCancelCapture? onTransitionEnd? onTransitionEndCapture? onTransitionRun? onTransitionRunCapture? onTransitionStart? onTransitionStartCapture? onWheel? onWheelCapture? options? placeholder? searchable? searchPlaceholder? secondaryLabel? selectedKey? selectionMode? size? slot? style? translate? validate? validationBehavior? value?

    Properties

    "aria-describedby"?: string

    Identifies the element (or elements) that describes the object.

    "aria-details"?: string

    Identifies the element (or elements) that provide a detailed, extended description for the object.

    "aria-label"?: string

    Defines a string value that labels the current element.

    "aria-labelledby"?: string

    Identifies the element (or elements) that labels the current element.

    autoComplete?: string

    Describes the type of autocomplete functionality the input should provide if any. See MDN.

    autoFocus?: boolean

    Whether the element should receive focus on render.

    children?: ChildrenOrFunction<SelectRenderProps>

    The children of the component. A function may be provided to alter the children based on component state.

    className?: ClassNameOrFunction<SelectRenderProps>

    The CSS className for the element. A function may be provided to compute the class based on component state.

    defaultOpen?: boolean

    Sets the default open state of the menu.

    defaultSelectedKey?: Key

    The initial selected key in the collection (uncontrolled).

    defaultValue?: ValueType<T>

    The default value (uncontrolled).

    description?: string | null

    The description of the text field

    dir?: string
    disabledKeys?: Iterable<Key, any, any>

    The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.

    excludeFromTabOrder?: boolean

    Whether to exclude the element from the sequential tab order. If true, the element will not be focusable via the keyboard by tabbing. This should be avoided except in rare scenarios where an alternative means of accessing the element or its functionality via the keyboard is available.

    form?: string

    The <form> element to associate the input with. The value of this attribute must be the id of a <form> in the same document. See MDN.

    hidden?: boolean
    icon?: ReactNode

    An icon to render before the input

    id?: string

    The element's unique identifier. See MDN.

    inert?: boolean
    isDisabled?: boolean

    Whether the input is disabled.

    isInvalid?: boolean

    Whether the input value is invalid.

    isOpen?: boolean

    Sets the open state of the menu.

    isRequired?: boolean

    Whether user input is required on the input before form submission.

    label?: string | null

    The label of the text field

    lang?: string
    name?: string

    The name of the input, used when submitting an HTML form.

    onAnimationEnd?: AnimationEventHandler<HTMLDivElement>
    onAnimationEndCapture?: AnimationEventHandler<HTMLDivElement>
    onAnimationIteration?: AnimationEventHandler<HTMLDivElement>
    onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement>
    onAnimationStart?: AnimationEventHandler<HTMLDivElement>
    onAnimationStartCapture?: AnimationEventHandler<HTMLDivElement>
    onAuxClick?: MouseEventHandler<HTMLDivElement>
    onAuxClickCapture?: MouseEventHandler<HTMLDivElement>
    onBlur?: (e: FocusEvent<Element>) => void

    Handler that is called when the element loses focus.

    onChange?: (value: ValueType) => void

    Handler that is called when the value changes.

    onClick?: MouseEventHandler<HTMLDivElement>
    onClickCapture?: MouseEventHandler<HTMLDivElement>
    onContextMenu?: MouseEventHandler<HTMLDivElement>
    onContextMenuCapture?: MouseEventHandler<HTMLDivElement>
    onDoubleClick?: MouseEventHandler<HTMLDivElement>
    onDoubleClickCapture?: MouseEventHandler<HTMLDivElement>
    onFocus?: (e: FocusEvent<Element>) => void

    Handler that is called when the element receives focus.

    onFocusChange?: (isFocused: boolean) => void

    Handler that is called when the element's focus status changes.

    onGotPointerCapture?: PointerEventHandler<HTMLDivElement>
    onGotPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>
    onKeyDown?: (e: KeyboardEvent) => void

    Handler that is called when a key is pressed.

    onKeyUp?: (e: KeyboardEvent) => void

    Handler that is called when a key is released.

    onLostPointerCapture?: PointerEventHandler<HTMLDivElement>
    onLostPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>
    onMouseDown?: MouseEventHandler<HTMLDivElement>
    onMouseDownCapture?: MouseEventHandler<HTMLDivElement>
    onMouseEnter?: MouseEventHandler<HTMLDivElement>
    onMouseLeave?: MouseEventHandler<HTMLDivElement>
    onMouseMove?: MouseEventHandler<HTMLDivElement>
    onMouseMoveCapture?: MouseEventHandler<HTMLDivElement>
    onMouseOut?: MouseEventHandler<HTMLDivElement>
    onMouseOutCapture?: MouseEventHandler<HTMLDivElement>
    onMouseOver?: MouseEventHandler<HTMLDivElement>
    onMouseOverCapture?: MouseEventHandler<HTMLDivElement>
    onMouseUp?: MouseEventHandler<HTMLDivElement>
    onMouseUpCapture?: MouseEventHandler<HTMLDivElement>
    onOpenChange?: (isOpen: boolean) => void

    Method that is called when the open state of the menu changes.

    onPointerCancel?: PointerEventHandler<HTMLDivElement>
    onPointerCancelCapture?: PointerEventHandler<HTMLDivElement>
    onPointerDown?: PointerEventHandler<HTMLDivElement>
    onPointerDownCapture?: PointerEventHandler<HTMLDivElement>
    onPointerEnter?: PointerEventHandler<HTMLDivElement>
    onPointerLeave?: PointerEventHandler<HTMLDivElement>
    onPointerMove?: PointerEventHandler<HTMLDivElement>
    onPointerMoveCapture?: PointerEventHandler<HTMLDivElement>
    onPointerOut?: PointerEventHandler<HTMLDivElement>
    onPointerOutCapture?: PointerEventHandler<HTMLDivElement>
    onPointerOver?: PointerEventHandler<HTMLDivElement>
    onPointerOverCapture?: PointerEventHandler<HTMLDivElement>
    onPointerUp?: PointerEventHandler<HTMLDivElement>
    onPointerUpCapture?: PointerEventHandler<HTMLDivElement>
    onScroll?: UIEventHandler<HTMLDivElement>
    onScrollCapture?: UIEventHandler<HTMLDivElement>
    onSelectionChange?: (key: Key | null) => void

    Handler that is called when the selection changes.

    onTouchCancel?: TouchEventHandler<HTMLDivElement>
    onTouchCancelCapture?: TouchEventHandler<HTMLDivElement>
    onTouchEnd?: TouchEventHandler<HTMLDivElement>
    onTouchEndCapture?: TouchEventHandler<HTMLDivElement>
    onTouchMove?: TouchEventHandler<HTMLDivElement>
    onTouchMoveCapture?: TouchEventHandler<HTMLDivElement>
    onTouchStart?: TouchEventHandler<HTMLDivElement>
    onTouchStartCapture?: TouchEventHandler<HTMLDivElement>
    onTransitionCancel?: TransitionEventHandler<HTMLDivElement>
    onTransitionCancelCapture?: TransitionEventHandler<HTMLDivElement>
    onTransitionEnd?: TransitionEventHandler<HTMLDivElement>
    onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement>
    onTransitionRun?: TransitionEventHandler<HTMLDivElement>
    onTransitionRunCapture?: TransitionEventHandler<HTMLDivElement>
    onTransitionStart?: TransitionEventHandler<HTMLDivElement>
    onTransitionStartCapture?: TransitionEventHandler<HTMLDivElement>
    onWheel?: WheelEventHandler<HTMLDivElement>
    onWheelCapture?: WheelEventHandler<HTMLDivElement>
    options?: Option[]

    The options of the select field

    placeholder?: string

    Temporary text that occupies the select when it is empty.

    'Select an item' (localized)
    
    searchable?: boolean

    Enable search/filter functionality in the dropdown

    false
    
    searchPlaceholder?: string

    placeholder text for the search input only used when searchable is true

    'search...'

    secondaryLabel?: string | null

    The secondary label of the text field

    selectedKey?: Key | null

    The currently selected key in the collection (controlled).

    selectionMode?: T

    Selection mode, single or multiple

    'single'

    size?: "small" | "medium" | Partial<Record<Breakpoint, "small" | "medium">>

    The size of the select field

    'small'
    
    slot?: string | null

    A slot name for the component. Slots allow the component to receive props from a parent component. An explicit null value indicates that the local props completely override all props received from a parent.

    style?: StyleOrFunction<SelectRenderProps>

    The inline style for the element. A function may be provided to compute the style based on component state.

    translate?: "yes" | "no"
    validate?: (value: ValidationType) => true | ValidationError | null | undefined

    A function that returns an error message if a given value is invalid. Validation errors are displayed to the user when the form is submitted if validationBehavior="native". For realtime validation, use the isInvalid prop instead.

    validationBehavior?: "native" | "aria"

    Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.

    'native'
    
    value?: ValueType<T>

    The current value (controlled).