Backstage
    Preparing search index...

    Interface ComboboxProps

    interface ComboboxProps {
        allowsCustomValue?: boolean;
        allowsEmptyCollection?: boolean;
        "aria-describedby"?: string;
        "aria-details"?: string;
        "aria-label"?: string;
        "aria-labelledby"?: string;
        autoFocus?: boolean;
        children?: ChildrenOrFunction<ComboBoxRenderProps>;
        className?: string;
        defaultFilter?: (textValue: string, inputValue: string) => boolean;
        defaultInputValue?: string;
        defaultItems?: Iterable<Option, any, any>;
        defaultSelectedKey?: Key | null;
        defaultValue?: Key | null;
        description?: string | null;
        dir?: string;
        disabledKeys?: Iterable<Key, any, any>;
        form?: string;
        formValue?: "text" | "key";
        hidden?: boolean;
        icon?: ReactNode;
        id?: string;
        inert?: boolean;
        inputValue?: string;
        isDisabled?: boolean;
        isInvalid?: boolean;
        isReadOnly?: boolean;
        isRequired?: boolean;
        items?: Iterable<Option, any, any>;
        label?: string | null;
        lang?: string;
        menuTrigger?: MenuTriggerAction;
        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<HTMLInputElement>) => void;
        onChange?: (value: Key | null) => void;
        onClick?: MouseEventHandler<HTMLDivElement>;
        onClickCapture?: MouseEventHandler<HTMLDivElement>;
        onContextMenu?: MouseEventHandler<HTMLDivElement>;
        onContextMenuCapture?: MouseEventHandler<HTMLDivElement>;
        onDoubleClick?: MouseEventHandler<HTMLDivElement>;
        onDoubleClickCapture?: MouseEventHandler<HTMLDivElement>;
        onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
        onFocusChange?: (isFocused: boolean) => void;
        onGotPointerCapture?: PointerEventHandler<HTMLDivElement>;
        onGotPointerCaptureCapture?: PointerEventHandler<HTMLDivElement>;
        onInputChange?: (value: string) => void;
        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, menuTrigger?: MenuTriggerAction) => 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 | OptionSection)[];
        placeholder?: string;
        render?: DOMRenderFunction<"div", ComboBoxRenderProps>;
        secondaryLabel?: string | null;
        selectedKey?: Key | null;
        selectionMode?: "single";
        shouldFocusWrap?: boolean;
        size?: "small" | "medium" | Partial<Record<Breakpoint, "small" | "medium">>;
        slot?: string | null;
        style?: StyleOrFunction<ComboBoxRenderProps>;
        translate?: "yes" | "no";
        validate?: (
            value: ComboBoxValidationValue,
        ) => true | ValidationError | null | undefined;
        validationBehavior?: "native" | "aria";
        value?: Key | null;
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowsCustomValue? allowsEmptyCollection? aria-describedby? aria-details? aria-label? aria-labelledby? autoFocus? children? className? defaultFilter? defaultInputValue? defaultItems? defaultSelectedKey? defaultValue? description? dir? disabledKeys? form? formValue? hidden? icon? id? inert? inputValue? isDisabled? isInvalid? isReadOnly? isRequired? items? label? lang? menuTrigger? name? onAnimationEnd? onAnimationEndCapture? onAnimationIteration? onAnimationIterationCapture? onAnimationStart? onAnimationStartCapture? onAuxClick? onAuxClickCapture? onBlur? onChange? onClick? onClickCapture? onContextMenu? onContextMenuCapture? onDoubleClick? onDoubleClickCapture? onFocus? onFocusChange? onGotPointerCapture? onGotPointerCaptureCapture? onInputChange? 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? render? secondaryLabel? selectedKey? selectionMode? shouldFocusWrap? size? slot? style? translate? validate? validationBehavior? value?

    Properties

    allowsCustomValue?: boolean

    Whether the ComboBox allows a non-item matching input value to be set.

    allowsEmptyCollection?: boolean

    Whether the combo box allows the menu to be open when the collection is empty.

    "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.

    autoFocus?: boolean

    Whether the element should receive focus on render.

    children?: ChildrenOrFunction<ComboBoxRenderProps>

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

    className?: string
    defaultFilter?: (textValue: string, inputValue: string) => boolean

    The filter function used to determine if a option should be included in the combo box list.

    defaultInputValue?: string

    The default value of the ComboBox input (uncontrolled).

    defaultItems?: Iterable<Option, any, any>

    The list of ComboBox items (uncontrolled).

    defaultSelectedKey?: Key | null

    The initial selected key in the collection (uncontrolled).

    defaultValue?: Key | null

    The default value (uncontrolled).

    description?: string | null
    dir?: string
    disabledKeys?: Iterable<Key, any, any>

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

    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.

    formValue?: "text" | "key"

    Whether the text or key of the selected item is submitted as part of an HTML form. When allowsCustomValue is true, this option does not apply and the text is always submitted.

    'key'
    
    hidden?: boolean
    icon?: ReactNode

    An icon to render before the input

    id?: string

    The element's unique identifier. See MDN.

    inert?: boolean
    inputValue?: string

    The value of the ComboBox input (controlled).

    isDisabled?: boolean

    Whether the input is disabled.

    isInvalid?: boolean

    Whether the input value is invalid.

    isReadOnly?: boolean

    Whether the input can be selected but not changed by the user.

    isRequired?: boolean
    items?: Iterable<Option, any, any>

    The list of ComboBox items (controlled).

    label?: string | null
    lang?: string
    menuTrigger?: MenuTriggerAction

    The interaction required to display the ComboBox menu.

    'input'
    
    name?: string

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

    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<HTMLInputElement>) => void

    Handler that is called when the element loses focus.

    onChange?: (value: Key | null) => 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<HTMLInputElement>) => 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>
    onInputChange?: (value: string) => void

    Handler that is called when the ComboBox input value changes.

    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, menuTrigger?: MenuTriggerAction) => void

    Method that is called when the open state of the menu changes. Returns the new open state and the action that caused the opening of the menu.

    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 | OptionSection)[]

    The options of the combobox field. Pass flat options, option sections for grouped display, or a mix of both in the same array.

    placeholder?: string

    Placeholder text for the input.

    render?: DOMRenderFunction<"div", ComboBoxRenderProps>

    Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components.

    Requirements:

    • You must render the expected element type (e.g. if <button> is expected, you cannot render an <a>).
    • Only a single root DOM element can be rendered (no fragments).
    • You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
    secondaryLabel?: string | null
    selectedKey?: Key | null

    The currently selected key in the collection (controlled).

    selectionMode?: "single"

    Whether single or multiple selection is enabled.

    'single'
    
    shouldFocusWrap?: boolean

    Whether keyboard navigation is circular.

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

    The size of the combobox 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<ComboBoxRenderProps>

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

    translate?: "yes" | "no"
    validate?: (
        value: ComboBoxValidationValue,
    ) => 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?: Key | null

    The current value (controlled).