QUI React

Combobox

A combobox is an input widget with an associated popup that enables users to select a value from a collection of possible values.

import {QCombobox} from "@qui/react"

Overview

The Combobox Pattern is versatile. We've based our implementation on this specification.

  • When filterable is false, the combobox is select-only. This is functionally equivalent to an HTML select element.
  • When filterable is true, the combobox accepts input text. When the user types, suggested values are filtered by their logical association to the input text.

Examples

Option Type

Options are configured using the options prop. Supply each option as a string or an object. If an option is provided as an object, you will need to supply the optionLabel to indicate which property will be used for the option's label. optionValue can be provided to indicate which property will be used to uniquely identify the option.

import {ReactNode} from "react"
import {MapPin} from "lucide-react"
import {QCombobox} from "@qui/react"
export default function OptionAsString(): ReactNode {
return (
<div className="flex w-full flex-col items-center gap-4">
<QCombobox
className="max-w-[200px]"
fullWidth
options={[
"San Diego",
"Nashville",
"Denver",
"Miami",
"Las Vegas",
"New York City",
"San Francisco",
]}
placeholder="Select a City"
startIcon={MapPin}
/>
{/* Option as object: must use optionLabel */}
<QCombobox
className="max-w-[200px]"
fullWidth
optionLabel="name"
options={[
{id: 1, name: "San Diego"},
{id: 2, name: "Nashville"},
{id: 3, name: "Denver"},
{disabled: true, id: 4, name: "Miami"},
{id: 5, name: "Las Vegas"},
{id: 6, name: "New York City"},
{id: 7, name: "San Francisco"},
]}
placeholder="Select a City"
startIcon={MapPin}
/>
</div>
)
}

Select

When filterable is false, the combobox behaves similarly to the native <select> element.

import {ReactNode} from "react"
import {MapPin} from "lucide-react"
import {QCombobox} from "@qui/react"
export default function Showcase(): ReactNode {
return (
<QCombobox
className="max-w-[200px]"
fullWidth
optionLabel="name"
options={[
{id: 1, name: "San Diego"},
{id: 2, name: "Nashville"},
{id: 3, name: "Denver"},
{disabled: true, id: 4, name: "Miami"},
{id: 5, name: "Las Vegas"},
{id: 6, name: "New York City"},
{id: 7, name: "San Francisco"},
]}
placeholder="Select a City"
startIcon={MapPin}
/>
)
}

Multiple Selection

Pass the multiple property to enable multiple selection.

  • Each selected value will render as dismissable QTag components.
    • You can provide your own tags by supplying the renderTags prop.
  • Use the limitTags property to limit the number of visible values when the component isn't focused.
Banana
Orange
Pineapple
import {ReactNode} from "react"
import {Grape} from "lucide-react"
import {QComboboxOption} from "@qui/base"
import {QCombobox} from "@qui/react"
interface Fruit extends QComboboxOption {
id: number
name: string
}
const options: Fruit[] = [
{id: 1, name: "Banana"},
{id: 2, name: "Orange"},
{id: 3, name: "Pineapple"},
{id: 4, name: "Mango"},
{id: 5, name: "Grapes"},
{id: 6, name: "Watermelon"},
{id: 7, name: "Strawberry"},
{id: 8, name: "Blueberry"},
]
export default function Multiple(): ReactNode {
return (
<QCombobox
className="w-[300px]"
defaultValue={options.slice(0, 3)}
filterable
label="Choose your favorite fruits"
multiple
optionLabel="name"
optionValue="id"
options={options}
placeholder="Fruit"
startIcon={Grape}
/>
)
}

Filter

Pass the filterable property to enable the input field. The default filter function uses fuzzy matching to compare each option's label against the value of the input. Unmatched entries are hidden.

Customization

Use the label, hint, and error properties to describe the component. No These elements are automatically associated with the underlying <input> element for optimal accessibility.

Error
San Diego
import {ReactNode} from "react"
import {Info} from "lucide-react"
import {QComboboxOption} from "@qui/base"
import {QCombobox, QIcon} from "@qui/react"
interface City extends QComboboxOption {
id: number
name: string
}
const options: City[] = [
{id: 1, name: "San Diego"},
{id: 2, name: "Nashville"},
{id: 3, name: "Denver"},
{disabled: true, id: 4, name: "Miami"},
{id: 5, name: "Las Vegas"},
{id: 6, name: "New York City"},
{id: 7, name: "San Francisco"},
]
export default function Customization(): ReactNode {
return (
<div className="grid justify-center">
<div className="grid w-[300px] gap-y-5">
<QCombobox
fullWidth
hint="Hint"
label="Label"
optionLabel="name"
optionValue="id"
options={options}
placeholder="Select a City"
/>
<QCombobox
fullWidth
hint={
<span className="text-primary q-font-metadata-sm">Custom Hint</span>
}
label={
<div className="mb-1 flex items-center gap-1 text-primary q-font-heading-xxs">
<QIcon icon={Info} size="s" />
<span>Custom Label</span>
</div>
}
optionLabel="name"
options={options}
placeholder="Select a City"
/>
<QCombobox
error="Error"
fullWidth
label="Label"
optionLabel="name"
options={options}
placeholder="Select a City"
/>
<QCombobox
defaultValue={options[0]}
fullWidth
label="Read Only + Default Value"
optionLabel="name"
options={options}
placeholder="Select a City"
readOnly
/>
<QCombobox
disabled
fullWidth
label="Disabled"
optionLabel="name"
optionValue="id"
options={options}
placeholder="Select a City"
/>
<QCombobox
fullWidth
label="Loading Indicator"
loading
optionLabel="name"
optionValue="id"
options={options}
placeholder="Select a City"
/>
</div>
</div>
)
}

Custom Filter Function

To customize the filter function, supply the filterOptions property.

Custom Option Renderer

Since v1.3.0, you can supply your own option renderer using the renderOption prop.

  1. Your component must forward its ref to the root node.
  2. Your component must pass its props to the root node.
  3. Your component should destructure the option prop for custom rendering.
import {forwardRef, ReactNode} from "react"
import {CheckIcon, MapPin} from "lucide-react"
import {QCombobox, QComboboxOptionProps, QIcon} from "@qui/react"
CustomOptions.displayName = "CustomOptions"
interface Product {
name: string
type: string
}
const CustomOption = forwardRef<
HTMLButtonElement,
QComboboxOptionProps<Product>
>(({"data-selected": selected, option, ...props}, ref) => {
return (
<button ref={ref} {...props}>
<div className="flex w-full justify-between">
<div className="flex flex-col items-start">
<div className="text-primary q-font-body-sm">{option.name}</div>
<div className="text-secondary q-font-metadata-md">{option.type}</div>
</div>
{selected ? (
<div className="flex items-center justify-end">
<QIcon
className="q-foreground-1-secondary"
icon={CheckIcon}
size="m"
/>
</div>
) : null}
</div>
</button>
)
})
export default function CustomOptions(): ReactNode {
return (
<QCombobox
className="max-w-[250px]"
fullWidth
optionLabel="name"
options={
[
{name: "QCC2076.WIN.1.0", type: "Software"},
{name: "QUTS", type: "Tool"},
] satisfies Product[]
}
placeholder="Select a Product"
renderOption={CustomOption}
startIcon={MapPin}
/>
)
}

Select All

The following demo shows how to create a "Select All" dropdown option:

import {forwardRef, ReactNode, useMemo, useState} from "react"
import {MapPin} from "lucide-react"
import {clsx} from "@qui/base"
import {QCheckbox, QCombobox, QComboboxOptionProps} from "@qui/react"
SelectAll.displayName = "SelectAll"
interface Product {
name: string
}
export default function SelectAll(): ReactNode {
const [value, setValue] = useState<Product[]>([])
const [open, setOpen] = useState(false)
const [allSelected, setAllSelected] = useState(false)
const options = useMemo<Product[]>(
() => [{name: "QCC2076.WIN.1.0"}, {name: "QUTS"}],
[],
)
const deselectAll = () => {
setAllSelected(false)
setValue([])
}
const selectAll = () => {
setAllSelected(true)
setValue(options)
}
return (
<QCombobox
className="max-w-[250px]"
fullWidth
multiple
onChange={(event, value) => {
setValue(value)
setAllSelected(value.length === options.length)
}}
onOpenChange={setOpen}
open={open}
optionLabel="name"
options={[{name: "Select All"}, ...options] satisfies Product[]}
placeholder="Select a Product"
renderOption={forwardRef<
HTMLButtonElement,
QComboboxOptionProps<Product>
>((props, ref) => {
if (props.option.name === "Select All") {
return (
<button
ref={ref}
{...props}
className={clsx(props.className, "border-b border-b-subtle")}
onClick={() => {
allSelected ? deselectAll() : selectAll()
setOpen(false)
}}
>
<span className="flex gap-3">
<QCheckbox checked={allSelected} />
Select All
</span>
</button>
)
}
return <button {...props} ref={ref} />
})}
startIcon={MapPin}
value={value}
/>
)
}

Virtualization

Virtualization is implemented using the @tanstack/virtual library. For large datasets, use the virtual prop to render a virtual listbox. When enabled, this makes the container element the same height as the total number of items to be rendered, and then only renders the items that are currently visible.

The following example features a randomly-generated list of 10,000 cities.

import {ReactNode} from "react"
import {faker} from "@faker-js/faker"
import {SearchIcon} from "lucide-react"
import {QCombobox} from "@qui/react"
const data = faker.helpers.uniqueArray(faker.location.city, 10000).sort()
export default function Virtual(): ReactNode {
return (
<QCombobox
className="w-[250px]"
filterable
label="Cities"
options={data}
placeholder="Cities"
startIcon={SearchIcon}
virtual
/>
)
}

Playground

Size
Options
TSX
<QCombobox
disableOptionToggle={false}
filterable={false}
fullWidth
label="Label"
limitTags={2}
loading={false}
multiple={false}
optionLabel="name"
placeholder="Placeholder..."
showDropdownIcon={true}
size={m}
/>
Value
null

API

Props

Note that Option refers to a generic type. It is inferred from the data supplied to the options prop. Examples:

// `Option` is a string
<QCombobox options={["San Diego"]} />
// `Option` is an object of type {name: string}
<QCombobox optionLabel="name" options={[{name: "San Diego"}]} />
Name & DescriptionOption(s)Default
Array of options. Note that Option refers to a generic type.
Related symbols:
Array<Option>
The component used for the root node. It can be a React component or element.
| ElementType
| ComponentType
'div'
HTML autocomplete attribute.
string
'off'
If true, the first option is automatically focused when the dropdown is opened. Note that a selected option, if present, will be focused on open instead of the first option.
boolean
true
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
string
If true, the component will render a clear icon that resets the input field and values on click.
boolean
true
Default value of the input field.
string
''
The default value when uncontrolled.
boolean
The initial value.
| Option
| Array<Option>
If true, the dropdown will stay open after an option is selected.
boolean
false
If true, the dropdown will stay open after an option is selected if the user is holding the shift key.
boolean
true
If true, the component will appear dimmed and will not be interactive.
boolean
false
If true, prevents the active option from being deselected. Only applies when multiple is false.
boolean
Box shadow severity of the panel, based on the five elevation styles provided by QDS. A higher number means a more severe box shadow. Supply 0 to disable the box shadow.
| 0
| 1
| 2
| 3
| 4
| 5
| '0'
| '1'
| '2'
| '3'
| '4'
| '5'
4
Optional error, triggers the invalid style variant if supplied. This element is automatically associated with the component's input element for optimal accessibility.
ReactNode
Error icon, displayed when . Supply as false to disable
| false
| LucideIconBase
If true, the component's input element will accept a value, enabling option filtering.
boolean
false
If provided, this function will be used to filter options instead of the default function.
      (
      options: Array<Option>,
      inputValue: string,
      ) => Array<Option>
      If true, the component will take up the full width of its parent container.
      boolean
      false
      
      Used to determine the disabled state for a given option.
          (
          option: Option,
          ) => boolean
          Optional hint describing the element. This element is automatically associated with the component's input element for optimal accessibility.
          ReactNode
          Controlled id applied to the input element. If omitted, a unique identifier will be automatically generated for error, label, and hint accessibility.
          string
          attributes applied to the input element. Use with caution.
          HTMLAttributes<HTMLInputElement>
          {}
          Supply a ref to the input element.
          Ref<HTMLInputElement>
          The controlled value of the input field.
          string
          Optional label describing the element. Recommended. This element is automatically associated with the component's input element for optimal accessibility.
          ReactNode
          The maximum number of tags that will be visible when not focused. Set to -1 to disable the limit. Note that if renderTags is provided, this prop will have no effect.
          number
          -1
          
          Props applied to the listbox element that wraps the rendered options.
          HTMLAttributes<HTMLDivElement>
          Ref applied to the listbox element that wraps the rendered options. Note that this element is only rendered when the combobox is visible. If you are trying to bind event listeners to the listbox, like for scroll events, you should use listboxWrapperProps or listboxProps.
          Ref<HTMLDivElement>
          Props applied to the floating element that wraps the listbox element.
          HTMLAttributes<HTMLDivElement>
          If true, a loading spinner will render in place of the dropdown icon.
          boolean
          false
          
          If true, multiple values can be selected at once.
          boolean
          false
          
          When no options are available, this is the message that shows.
          ReactNode
          'No options...'
          
          Change function, fired when the selected option(s) change.
          • eventthe DOM event associated with the change.
          • valuethe updated value.
          • reasonthe cause of the event.
          • detailsevent details.
            (
            event:
            | KeyboardEvent
            | MouseEvent
            | SyntheticEvent
            | object,
            value: Multiple extends false
            ? Option | object
            : Array<Option>,
            reason:
            | 'clear'
            | 'selectOption'
            | 'removeOption'
            | 'input'
            | 'reset',
            details?: {option: Option},
            ) => void
            Callback fired when the input value changes.
            • valuethe updated value of the input field.
            • eventthe DOM event associated with the change. May be null.
            • reasonthe cause of the event.
            (
            value: string,
            event: ChangeEvent | object,
            reason:
            | 'input'
            | 'reset'
            | 'clear',
            ) => void
            Callback fired when the visibility of the dropdown panel changes.
            • openthe updated state.
            • eventthe DOM event associated with the change.
            • reasonthe cause of the event.
            (
            open: boolean,
            event: Event,
            reason?:
            | 'ancestor-scroll'
            | 'arrow-left'
            | 'arrow-right'
            | 'blur'
            | 'clear'
            | 'click'
            | 'escape-key'
            | 'focus'
            | 'hover'
            | 'input'
            | 'list-navigation'
            | 'outside-press'
            | 'reference-press'
            | 'remove-option'
            | 'safe-polygon'
            | 'select-option',
            ) => void
            The controlled state for the component's visibility.
            boolean
            Used to determine the string label for a given option. Can also be supplied as a function. This property is only used for options supplied as objects.
            Related symbols:
            | string
            | number
            | symbol
            | ((
            option: Option,
            ) => string)
            Used to determine the unique identifier for each option. Can also be supplied as a function. If omitted, the optionLabel is used. This property is only used for options supplied as objects.
            Related symbols:
            | string
            | number
            | symbol
            | ((
            option: Option,
            ) => string)
            HTML placeholder attribute.
            string
            If true, the component will not be interactive.
            boolean
            false
            
            Supply this property to render custom options.
                Related symbols:
                (
                props: QComboboxOptionProps,
                ) => ReactNode
                Override the tag renderer which is responsible for rendering the active values in the combobox when multiple is true.
                • valuethe option value.
                • getTagPropsprop spreader function, returns props for the tag element.
                  (
                  value: Array<Option>,
                  getTagProps: (
                  index: number,
                  ) => {
                  'data-tag-index': number
                  disabled: boolean
                  dismissable: boolean
                  getOptionLabel: (
                  option: Option,
                  ) => string
                  onDelete: (
                  event: SyntheticEvent,
                  option: Option,
                  ) => void
                  readOnly: boolean
                  tabIndex: -1
                  },
                  ) => ReactNode
                  id applied to the root element.
                  string
                  If true, the dropdown icon will show.
                  boolean
                  true
                  
                  Size of the element, label, hint, and error messages. When these properties are supplied as templates, size styles are omitted.
                  | 's'
                  | 'm'
                  | 'l'
                  lucide-react icon, positioned before the input. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization. https://lucide.dev
                  | LucideIcon
                  | ReactNode
                  The style global attribute contains CSS styling declarations to be applied to the element.
                  CSSProperties
                  Controlled value for this component. This prop is used to control the selected option (or options if multiple is true).
                  | Option
                  | Array<Option>
                  | object
                  Enables virtual rendering of the combobox options. visualization
                  boolean
                  Options passed to the useVirtualizer function. Refer to the Tanstack Virtual docs for detailed type information. Does nothing if virtual is false.
                  Partial<
                  VirtualizerOptions<
                  HTMLElement,
                  HTMLElement
                  >
                  >
                  The z-index CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.
                  ZIndex
                  1000
                  
                  Type
                  Array<Option>
                  Description
                  Array of options. Note that Option refers to a generic type.
                  Related symbols
                  Related symbols:
                  Type
                  | ElementType
                  | ComponentType
                  Default
                  'div'
                  
                  Description
                  The component used for the root node. It can be a React component or element.
                  Type
                  string
                  Default
                  'off'
                  
                  Description
                  HTML autocomplete attribute.
                  Type
                  boolean
                  Default
                  true
                  
                  Description
                  If true, the first option is automatically focused when the dropdown is opened. Note that a selected option, if present, will be focused on open instead of the first option.
                  Type
                  string
                  Description
                  The className property of the Element interface gets and sets the value of the class attribute of the specified element.
                  Type
                  boolean
                  Default
                  true
                  
                  Description
                  If true, the component will render a clear icon that resets the input field and values on click.
                  Type
                  string
                  Default
                  ''
                  
                  Description
                  Default value of the input field.
                  Type
                  boolean
                  Description
                  The default value when uncontrolled.
                  Type
                  | Option
                  | Array<Option>
                  Description
                  The initial value.
                  Type
                  boolean
                  Default
                  false
                  
                  Description
                  If true, the dropdown will stay open after an option is selected.
                  Type
                  boolean
                  Default
                  true
                  
                  Description
                  If true, the dropdown will stay open after an option is selected if the user is holding the shift key.
                  Type
                  boolean
                  Default
                  false
                  
                  Description
                  If true, the component will appear dimmed and will not be interactive.
                  Type
                  boolean
                  Description
                  If true, prevents the active option from being deselected. Only applies when multiple is false.
                  Type
                  | 0
                  | 1
                  | 2
                  | 3
                  | 4
                  | 5
                  | '0'
                  | '1'
                  | '2'
                  | '3'
                  | '4'
                  | '5'
                  Default
                  4
                  
                  Description
                  Box shadow severity of the panel, based on the five elevation styles provided by QDS. A higher number means a more severe box shadow. Supply 0 to disable the box shadow.
                  Description
                  Optional error, triggers the invalid style variant if supplied. This element is automatically associated with the component's input element for optimal accessibility.
                  Type
                  | false
                  | LucideIconBase
                  Description
                  Error icon, displayed when . Supply as false to disable
                  Type
                  boolean
                  Default
                  false
                  
                  Description
                  If true, the component's input element will accept a value, enabling option filtering.
                  Type
                  (
                  options: Array<Option>,
                  inputValue: string,
                  ) => Array<Option>
                  Description
                  If provided, this function will be used to filter options instead of the default function.
                      Type
                      boolean
                      Default
                      false
                      
                      Description
                      If true, the component will take up the full width of its parent container.
                      Type
                      (
                      option: Option,
                      ) => boolean
                      Description
                      Used to determine the disabled state for a given option.
                          Description
                          Optional hint describing the element. This element is automatically associated with the component's input element for optimal accessibility.
                          Type
                          string
                          Description
                          Controlled id applied to the input element. If omitted, a unique identifier will be automatically generated for error, label, and hint accessibility.
                          Type
                          HTMLAttributes<HTMLInputElement>
                          Default
                          {}
                          Description
                          attributes applied to the input element. Use with caution.
                          Type
                          Ref<HTMLInputElement>
                          Description
                          Supply a ref to the input element.
                          Type
                          string
                          Description
                          The controlled value of the input field.
                          Description
                          Optional label describing the element. Recommended. This element is automatically associated with the component's input element for optimal accessibility.
                          Type
                          number
                          Default
                          -1
                          
                          Description
                          The maximum number of tags that will be visible when not focused. Set to -1 to disable the limit. Note that if renderTags is provided, this prop will have no effect.
                          Type
                          HTMLAttributes<HTMLDivElement>
                          Description
                          Props applied to the listbox element that wraps the rendered options.
                          Type
                          Ref<HTMLDivElement>
                          Description
                          Ref applied to the listbox element that wraps the rendered options. Note that this element is only rendered when the combobox is visible. If you are trying to bind event listeners to the listbox, like for scroll events, you should use listboxWrapperProps or listboxProps.
                          Type
                          HTMLAttributes<HTMLDivElement>
                          Description
                          Props applied to the floating element that wraps the listbox element.
                          Type
                          boolean
                          Default
                          false
                          
                          Description
                          If true, a loading spinner will render in place of the dropdown icon.
                          Type
                          boolean
                          Default
                          false
                          
                          Description
                          If true, multiple values can be selected at once.
                          Default
                          'No options...'
                          
                          Description
                          When no options are available, this is the message that shows.
                          Type
                          (
                          event:
                          | KeyboardEvent
                          | MouseEvent
                          | SyntheticEvent
                          | object,
                          value: Multiple extends false
                          ? Option | object
                          : Array<Option>,
                          reason:
                          | 'clear'
                          | 'selectOption'
                          | 'removeOption'
                          | 'input'
                          | 'reset',
                          details?: {option: Option},
                          ) => void
                          Description
                          Change function, fired when the selected option(s) change.
                          • eventthe DOM event associated with the change.
                          • valuethe updated value.
                          • reasonthe cause of the event.
                          • detailsevent details.
                            Type
                            (
                            value: string,
                            event: ChangeEvent | object,
                            reason:
                            | 'input'
                            | 'reset'
                            | 'clear',
                            ) => void
                            Description
                            Callback fired when the input value changes.
                            • valuethe updated value of the input field.
                            • eventthe DOM event associated with the change. May be null.
                            • reasonthe cause of the event.
                            Type
                            (
                            open: boolean,
                            event: Event,
                            reason?:
                            | 'ancestor-scroll'
                            | 'arrow-left'
                            | 'arrow-right'
                            | 'blur'
                            | 'clear'
                            | 'click'
                            | 'escape-key'
                            | 'focus'
                            | 'hover'
                            | 'input'
                            | 'list-navigation'
                            | 'outside-press'
                            | 'reference-press'
                            | 'remove-option'
                            | 'safe-polygon'
                            | 'select-option',
                            ) => void
                            Description
                            Callback fired when the visibility of the dropdown panel changes.
                            • openthe updated state.
                            • eventthe DOM event associated with the change.
                            • reasonthe cause of the event.
                            Type
                            boolean
                            Description
                            The controlled state for the component's visibility.
                            Type
                            | string
                            | number
                            | symbol
                            | ((
                            option: Option,
                            ) => string)
                            Description
                            Used to determine the string label for a given option. Can also be supplied as a function. This property is only used for options supplied as objects.
                            Related symbols
                            Related symbols:
                            Type
                            | string
                            | number
                            | symbol
                            | ((
                            option: Option,
                            ) => string)
                            Description
                            Used to determine the unique identifier for each option. Can also be supplied as a function. If omitted, the optionLabel is used. This property is only used for options supplied as objects.
                            Related symbols
                            Related symbols:
                            Type
                            string
                            Description
                            HTML placeholder attribute.
                            Type
                            boolean
                            Default
                            false
                            
                            Description
                            If true, the component will not be interactive.
                            Type
                            (
                            props: QComboboxOptionProps,
                            ) => ReactNode
                            Description
                            Supply this property to render custom options.
                                Related symbols
                                Related symbols:
                                Type
                                (
                                value: Array<Option>,
                                getTagProps: (
                                index: number,
                                ) => {
                                'data-tag-index': number
                                disabled: boolean
                                dismissable: boolean
                                getOptionLabel: (
                                option: Option,
                                ) => string
                                onDelete: (
                                event: SyntheticEvent,
                                option: Option,
                                ) => void
                                readOnly: boolean
                                tabIndex: -1
                                },
                                ) => ReactNode
                                Description
                                Override the tag renderer which is responsible for rendering the active values in the combobox when multiple is true.
                                • valuethe option value.
                                • getTagPropsprop spreader function, returns props for the tag element.
                                  Type
                                  string
                                  Description
                                  id applied to the root element.
                                  Type
                                  boolean
                                  Default
                                  true
                                  
                                  Description
                                  If true, the dropdown icon will show.
                                  Type
                                  | 's'
                                  | 'm'
                                  | 'l'
                                  Description
                                  Size of the element, label, hint, and error messages. When these properties are supplied as templates, size styles are omitted.
                                  Type
                                  | LucideIcon
                                  | ReactNode
                                  Description
                                  lucide-react icon, positioned before the input. If supplied as a LucideIcon, the size will automatically match the size prop. Supply as a ReactElement for additional customization. https://lucide.dev
                                  Description
                                  The style global attribute contains CSS styling declarations to be applied to the element.
                                  Type
                                  | Option
                                  | Array<Option>
                                  | object
                                  Description
                                  Controlled value for this component. This prop is used to control the selected option (or options if multiple is true).
                                  Type
                                  boolean
                                  Description
                                  Enables virtual rendering of the combobox options. visualization
                                  Type
                                  Partial<
                                  VirtualizerOptions<
                                  HTMLElement,
                                  HTMLElement
                                  >
                                  >
                                  Description
                                  Options passed to the useVirtualizer function. Refer to the Tanstack Virtual docs for detailed type information. Does nothing if virtual is false.
                                  Type
                                  ZIndex
                                  Default
                                  1000
                                  
                                  Description
                                  The z-index CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.

                                  Keyboard Events

                                  • If the combobox is editable and an autocomplete suggestion is selected in the popup, accepts the suggestion.
                                    • If the suggestion is already selected, the selection is toggled off.
                                  • If focus is on the input field and the popup is closed, the popup is opened.
                                  • Dismisses the popup if it is visible and returns focus to the input element.
                                  • The popup is closed and the right-most tag is focused if all of the conditions apply:
                                    • The popup is currently open.
                                    • multiple is true.
                                    • The input field is focused.
                                    • The input value is empty.
                                    • At least one dropdown option is selected.
                                  • If multiple is true and a tag is already focused, moves focus to the previous option.
                                  • If the popup is visible, closes the popup.
                                  • If multiple is true and a tag is focused, moves focus to the next tag or the input field if the last tag is already selected.
                                  • If the popup is available, opens the popup.
                                  • If the popup is available and a dropdown item is focused, focus is moved to the next available option.
                                  • If the popup is available, opens the popup.
                                  • If the popup is available and an item is focused, focus is moved to the previous available option.
                                  • If filterable is true and the input field is not empty, behaves as expected.
                                  • If filterable is true,multiple is false, and a value is selected: clears the value.
                                  • If multiple is true, at least one option is selected, and focus is on a tag: moves focus to the input element.
                                  • Else if the input is focused and filterable is true, behaves as expected by inserting a space into the input field.
                                  • Else, the popup is opened.

                                  QComboboxOptionProps

                                  Name & DescriptionOption(s)Default
                                  The option.
                                  Option
                                  If true, the option is currently highlighted in the listbox. This indicates that the combobox option is focused. Note that all "focus" in this context is virtual, and does not indicate DOM focus.
                                  boolean
                                  The option's numeric position in the dropdown.
                                  number
                                  If true, the option is currently selected.
                                  boolean
                                  If true, virtual rendering is enabled.
                                  boolean
                                  Type
                                  Option
                                  Description
                                  The option.
                                  Type
                                  boolean
                                  Description
                                  If true, the option is currently highlighted in the listbox. This indicates that the combobox option is focused. Note that all "focus" in this context is virtual, and does not indicate DOM focus.
                                  Type
                                  number
                                  Description
                                  The option's numeric position in the dropdown.
                                  Type
                                  boolean
                                  Description
                                  If true, the option is currently selected.
                                  Type
                                  boolean
                                  Description
                                  If true, virtual rendering is enabled.