Combobox

The Combobox consists of a label, a text-input field, and a chevron icon that indicates the control can expand. The input field contains the current value or placeholder text and is enclosed by a container that provides focus and hover states. Activating the control reveals the dropdown menu, which presents a list of options.

import {Combobox} from "@qualcomm-ui/react/combobox"

Overview

  • Each combobox uses the comboboxCollection helper to manage the list of options. This creates a ListCollection instance, documented below.

Examples

Simple

The simple API provides a standalone component with bundled subcomponents.

<Combobox
  collection={collection}
  label="Country"
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
/>

Composite

Build with the composite API for granular control. This API requires you to provide each subcomponent, but gives you full control over the structure and layout.

<Combobox.Root
  className="w-56"
  collection={collection}
  icon={Search}
  name="combobox-composite"
  onInputValueChange={handleInputChange}
  placeholder="Search..."
>
  <Combobox.Label>Search</Combobox.Label>
  <Combobox.Control>
    <Combobox.Input />
    <Combobox.ClearTrigger />
    <Combobox.Trigger />
  </Combobox.Control>
  <Portal>
    <Combobox.Positioner>
      <Combobox.Content>
        <Combobox.Empty>No results found</Combobox.Empty>
        {collection.items.map((item) => (
          <Combobox.Item key={item} item={item}>
            <Combobox.ItemText>{item}</Combobox.ItemText>
            <Combobox.ItemIndicator>✓</Combobox.ItemIndicator>
          </Combobox.Item>
        ))}
      </Combobox.Content>
    </Combobox.Positioner>
  </Portal>
</Combobox.Root>

Open on Click

Use the openOnClick prop to open the combobox when the user clicks on the input.

<Combobox
  collection={collection}
  label="Country"
  onInputValueChange={handleInputChange}
  openOnClick
  placeholder="Select a country"
/>

Input Behavior

Adjust the auto-completion behavior of the combobox with the inputBehavior prop.

<Combobox
  collection={collection}
  inputBehavior="autohighlight"
  label="Country"
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
/>

Multiple Selection

Use the multiple prop to enable multiple selection. When this is set, the combobox will always clear the input value when the user selects an option.

import {useState} from "react"

import type {ComboboxInputValueChangeDetails} from "@qualcomm-ui/core/combobox"
import {useListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Combobox} from "@qualcomm-ui/react/combobox"
import {Tag} from "@qualcomm-ui/react/tag"

import {countries} from "./country-list"

export function ComboboxMultipleDemo() {
  const {contains} = useFilter({sensitivity: "base"})
  const [value, setValue] = useState<string[]>([])

  const {collection, filter} = useListCollection({
    filter: contains,
    initialItems: countries,
  })

  function handleInputChange(details: ComboboxInputValueChangeDetails) {
    filter(details.inputValue)
  }

  function handleValueDismissed(item: string) {
    setValue(value.filter((v) => v !== item))
  }

  return (
    <div className="flex w-72 flex-col gap-4">
      <div className="flex flex-wrap gap-2">
        {value.map((item) => (
          <Tag
            key={item}
            emphasis="neutral"
            onClick={() => handleValueDismissed(item)}
            variant="dismissable"
          >
            {item}
          </Tag>
        ))}
      </div>
      <Combobox
        className="w-full"
        collection={collection}
        label="Country"
        multiple
        onInputValueChange={handleInputChange}
        onValueChange={(details) => setValue(details.value)}
        placeholder="Select a country"
        value={value}
      />
    </div>
  )
}

Highlight Matching Text

Use the highlightMatchingText prop to highlight the portion of each option that matches the user's input. This provides visual feedback during filtering.

<Combobox
  className="w-56"
  collection={collection}
  highlightMatchingText
  label="Country"
  name="combobox-highlight"
  onInputValueChange={handleInputChange}
  placeholder="Search countries..."
/>

ARIA Label

The Combobox's label is automatically associated with the input element for accessibility. If you omit the label, you should provide an aria-label to the input to give your combobox an accessible name.

<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
/>

Content Width

The positioning.sameWidth property controls whether the width of the combobox content matches the width of the input element. The default is true.

<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
  positioning={{sameWidth: false}}
/>

Input Icon

Use the icon prop to add an icon to the start of the input element.

<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  icon={MapPin}
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
/>

Icon Customization

Supply a ReactNode to the icon prop to customize the icon. This example features a loading indicator:

<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  icon={<ProgressRing size="xs" />}
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
/>

Items as Objects

The items prop can be an array of objects. Use the itemLabel and itemValue properties on the comboboxCollection to specify the label and value of each item.

{name: "San Diego", value: "SD"},
{name: "Nashville", value: "NV"},
{name: "Denver", value: "DV"},
{name: "Miami", value: "MI"},
{name: "Las Vegas", value: "LV"},
{name: "New York City", value: "NYC"},
{name: "San Francisco", value: "SF"},

Item Groups

Use the ListCollection's groupBy and groupSort properties to group items into categories. Then render them using the group() method on the ListCollection instance.

const {collection, filter} = useListCollection({
  filter: contains,
  groupBy: (item) => item.status || "",
  groupSort: ["", "Onboarded"],
  initialItems: chipSoftwareProducts,
  itemDisabled: (item) => item.status === "Onboarded",
  itemLabel: (item) => item.name,
  itemValue: (item) => item.softwareId,
})

Custom Item Rendering

When using the simple API, use the renderItem prop to customize the rendering of each item.

<Combobox
  className="w-72"
  collection={collection}
  label="Select team member"
  onInputValueChange={handleInputChange}
  placeholder="Search by name, role, or email"
  renderItem={({item, ...itemProps}) => {
    const person = item
    return (
      <Combobox.Item className="min-h-[48px]" item={item} {...itemProps}>
        <div className="flex flex-1 flex-col gap-0.5">
          <Combobox.ItemText>
            <span className="font-body-sm">{person.name}</span>
          </Combobox.ItemText>
          <div className="font-body-xs flex items-center gap-1">
            <span>{person.role}</span>
            <span>—</span>
            <span>{person.email}</span>
          </div>
        </div>
        <Combobox.ItemIndicator />
      </Combobox.Item>
    )
  }}
/>

When rendering custom items with virtual set to true, you must forward the data-virtual and style props to the rendered item:

<Combobox
  renderItem={({item, ...itemProps}) => {
    return (
      <Combobox.Item item={item} {...itemProps}>
        {/* ... */}
      </Combobox.Item>
    )
  }}
/>

Sizes

This component supports three size options to accommodate different layout densities and design requirements.

The available sizes are sm, md, and lg. The default size is md.

import type {ComboboxInputValueChangeDetails} from "@qualcomm-ui/core/combobox"
import {useListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Combobox} from "@qualcomm-ui/react/combobox"

const cityList = ["San Diego", "Dallas", "Denver"]

export function ComboboxSizesDemo() {
  const {contains} = useFilter({sensitivity: "base"})

  const {collection, filter} = useListCollection({
    filter: contains,
    initialItems: cityList,
  })

  function handleInputChange(details: ComboboxInputValueChangeDetails) {
    filter(details.inputValue)
  }

  return (
    <div className="flex flex-col items-center gap-4">
      <Combobox
        aria-label="City"
        className="w-40"
        collection={collection}
        onInputValueChange={handleInputChange}
        placeholder="sm"
        positioning={{sameWidth: true}}
        size="sm"
      />
      <Combobox
        aria-label="City"
        className="w-48"
        collection={collection}
        onInputValueChange={handleInputChange}
        placeholder="md"
        positioning={{sameWidth: true}}
        size="md"
      />
      <Combobox
        aria-label="City"
        className="w-56"
        collection={collection}
        onInputValueChange={handleInputChange}
        placeholder="lg"
        positioning={{sameWidth: true}}
        size="lg"
      />
    </div>
  )
}

Content Height

Change the height of the item container by adjusting the style of the Content element.

<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  contentProps={{style: {maxHeight: 240}}}
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
  positioning={{sameWidth: true}}
/>

Controlled State

Set the initial value using the defaultValue prop, or use value and onValueChange to control the value manually. These props follow our controlled state pattern.

<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  onInputValueChange={handleInputChange}
  onValueChange={(details) => setValue(details.value)}
  placeholder="Select a country"
  value={value}
/>

States

The following shows how the Combobox component appears in each interactive state.

Invalid
<Combobox
  className="w-48"
  collection={collection}
  defaultValue={[countries[0]]}
  disabled
  label="Disabled"
  onInputValueChange={handleInputChange}
/>
<Combobox
  className="w-48"
  collection={collection}
  defaultValue={[countries[0]]}
  label="Read only"
  onInputValueChange={handleInputChange}
  readOnly
/>
<Combobox
  className="w-48"
  collection={collection}
  defaultValue={[countries[0]]}
  errorText="Invalid"
  invalid
  label="Invalid"
  onInputValueChange={handleInputChange}
/>

Error Text and Indicator

Error messages are displayed using two props:

  • invalid
  • errorText (or the Combobox.ErrorText component when using the composite API)

The error text and indicator will only render when invalid is true.

You must select a country
<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  errorText="You must select a country"
  invalid={!value.length}
  onInputValueChange={handleInputChange}
  onValueChange={(details) => setValue(details.value)}
  placeholder="Select a country"
  value={value}
/>

Hint Text

Use the hint prop to provide additional context or instructions below the combobox.

Optional hint
<Combobox
  aria-label="Country"
  className="w-48"
  collection={collection}
  hint="Optional hint"
  onInputValueChange={handleInputChange}
  placeholder="Select a country"
/>

Within Dialog

To use the Combobox within a Dialog, you need to avoid portalling the Combobox.Positioner to the document's body. To do this using the simple API, set portalProps.disabled to true:

import type {ReactElement} from "react"

import type {ComboboxInputValueChangeDetails} from "@qualcomm-ui/core/combobox"
import {useListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Button} from "@qualcomm-ui/react/button"
import {Combobox} from "@qualcomm-ui/react/combobox"
import {Dialog} from "@qualcomm-ui/react/dialog"

import {countries} from "./country-list"

export function ComboboxWithinDialogDemo(): ReactElement {
  const {contains} = useFilter({sensitivity: "base"})

  const {collection, filter} = useListCollection({
    filter: contains,
    initialItems: countries,
  })

  function handleInputChange(details: ComboboxInputValueChangeDetails) {
    filter(details.inputValue)
  }

  return (
    <Dialog.Root>
      <Dialog.Trigger>
        <Button emphasis="primary" variant="fill">
          Open Dialog
        </Button>
      </Dialog.Trigger>
      <Dialog.FloatingPortal>
        <Dialog.Body>
          <Dialog.Heading>Dialog Title</Dialog.Heading>
          <Dialog.CloseButton />
          <Combobox
            aria-label="Country"
            className="w-48"
            collection={collection}
            onInputValueChange={handleInputChange}
            placeholder="Select a country"
            portalProps={{disabled: true}}
          />
        </Dialog.Body>

        <Dialog.Footer>
          <Dialog.CloseTrigger>
            <Button emphasis="primary" size="sm" variant="fill">
              Confirm
            </Button>
          </Dialog.CloseTrigger>
        </Dialog.Footer>
      </Dialog.FloatingPortal>
    </Dialog.Root>
  )
}

Within Popover

Like with the Dialog, you need to avoid portalling the Combobox.Positioner to the document's body:

import type {ReactElement} from "react"

import type {ComboboxInputValueChangeDetails} from "@qualcomm-ui/core/combobox"
import {useListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Button} from "@qualcomm-ui/react/button"
import {Combobox} from "@qualcomm-ui/react/combobox"
import {Popover} from "@qualcomm-ui/react/popover"

import {countries} from "./country-list"

export function ComboboxWithinPopoverDemo(): ReactElement {
  const {contains} = useFilter({sensitivity: "base"})

  const {collection, filter} = useListCollection({
    filter: contains,
    initialItems: countries,
  })

  function handleInputChange(details: ComboboxInputValueChangeDetails) {
    filter(details.inputValue)
  }

  return (
    <Popover
      label="Combobox Example"
      trigger={<Button emphasis="primary">Show Popover</Button>}
    >
      <Combobox
        className="w-48"
        collection={collection}
        label="Country"
        onInputValueChange={handleInputChange}
        placeholder="Select a country"
        portalProps={{disabled: true}}
      />
    </Popover>
  )
}

Async Loading

This example shows how to load items asynchronously and display a loading indicator.

<Combobox
  className="w-56"
  collection={collection}
  icon={isFetching ? <ProgressRing size="xs" /> : undefined}
  inputValue={inputValue}
  label="Starship"
  onInputValueChange={(details) => setInputValue(details.inputValue)}
  placeholder="Search for a starship"
/>

Virtualized

For large lists, use the virtual prop to improve performance. This virtualizes the visible list items for performant scrolling and searching. The following example features a list of 5000 mock usernames.

import {useState} from "react"

import {useAsyncListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Combobox} from "@qualcomm-ui/react/combobox"
import {ProgressRing} from "@qualcomm-ui/react/progress-ring"

import {useMockUsers} from "./use-mock-users"

export function ComboboxVirtualDemo() {
  const {data, isFetching} = useMockUsers(5000)
  const {contains} = useFilter({sensitivity: "base"})

  const [inputValue, setInputValue] = useState<string>("")

  const {collection} = useAsyncListCollection<string>({
    filter: contains,
    filterText: inputValue,
    items: data ?? [],
  })

  return (
    <Combobox
      className="w-56"
      collection={collection}
      icon={isFetching ? <ProgressRing size="xs" /> : undefined}
      inputBehavior="autohighlight"
      inputValue={inputValue}
      label="Users"
      onInputValueChange={(details) => setInputValue(details.inputValue)}
      placeholder="Search for a username"
      virtual
    />
  )
}

Forms

Choose the form library that fits your needs—we've built examples with React Hook Form and Tanstack Form to get you started.

React Hook Form

Use React Hook Form to handle the input state and validation. ArkType works great for schema validation if you need it.

import type {ReactElement} from "react"

import {type} from "arktype"
import {Controller, type SubmitHandler, useForm} from "react-hook-form"

import type {ComboboxInputValueChangeDetails} from "@qualcomm-ui/core/combobox"
import {useListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Button} from "@qualcomm-ui/react/button"
import {Combobox} from "@qualcomm-ui/react/combobox"
import {createToaster, Toaster} from "@qualcomm-ui/react/toast"

import {countries} from "./country-list"

const valueSchema = type({
  country: type("string[] > 0").configure({
    message: "At least one country must be selected",
  }),
})

type ValueSchema = typeof valueSchema.infer

const toaster = createToaster({
  overlap: true,
  placement: "bottom-end",
})

export function ComboboxHookFormDemo(): ReactElement {
  const {contains} = useFilter({sensitivity: "base"})

  const {collection, filter} = useListCollection({
    filter: contains,
    initialItems: countries,
  })

  function handleInputChange(details: ComboboxInputValueChangeDetails) {
    filter(details.inputValue)
  }

  const {
    control,
    formState: {isSubmitting},
    handleSubmit,
    setError,
  } = useForm<ValueSchema>({
    defaultValues: {
      country: [],
    },
  })

  const handleFormSubmit: SubmitHandler<ValueSchema> = (data) => {
    const validation = valueSchema(data)

    if (validation instanceof type.errors) {
      for (const error of validation) {
        const field = error.path?.[0] as keyof ValueSchema
        if (field) {
          setError(field, {
            message: error.message,
          })
        }
      }
      return
    }

    toaster.create({
      label: "Form submitted",
      type: "success",
    })
  }

  return (
    <>
      <Toaster toaster={toaster} />
      <form
        className="w-48"
        noValidate
        onSubmit={(event) => void handleSubmit(handleFormSubmit)(event)}
      >
        <Controller
          control={control}
          name="country"
          render={({field: {onChange, ...fieldProps}, fieldState: {error}}) => (
            <Combobox
              className="w-full"
              collection={collection}
              errorText={error?.message}
              invalid={!!error}
              label="Country"
              onInputValueChange={handleInputChange}
              onValueChange={(details) => onChange(details.value)}
              placeholder="Select a country"
              required
              {...fieldProps}
            />
          )}
        />
        <div className="mt-2 flex w-full justify-end">
          <Button
            disabled={isSubmitting}
            emphasis="primary"
            type="submit"
            variant="fill"
          >
            Submit
          </Button>
        </div>
      </form>
    </>
  )
}

Tanstack Form

Tanstack Form handles validation with its built-in validators.

import type {ReactElement} from "react"

import {useForm} from "@tanstack/react-form"

import type {ComboboxInputValueChangeDetails} from "@qualcomm-ui/core/combobox"
import {useListCollection} from "@qualcomm-ui/react-core/collection"
import {useFilter} from "@qualcomm-ui/react-core/locale"
import {Button} from "@qualcomm-ui/react/button"
import {Combobox} from "@qualcomm-ui/react/combobox"
import {createToaster, Toaster} from "@qualcomm-ui/react/toast"

import {countries} from "./country-list"

const toaster = createToaster({
  overlap: true,
  placement: "bottom-end",
})

export function ComboboxTanstackFormDemo(): ReactElement {
  const {contains} = useFilter({sensitivity: "base"})

  const {collection, filter} = useListCollection({
    filter: contains,
    initialItems: countries,
  })

  function handleInputChange(details: ComboboxInputValueChangeDetails) {
    filter(details.inputValue)
  }

  const form = useForm({
    defaultValues: {
      country: [] as string[],
    },
    onSubmit: () => {
      toaster.create({
        label: "Form submitted",
        type: "success",
      })
    },
  })

  return (
    <>
      <Toaster toaster={toaster} />
      <form
        className="w-48"
        noValidate
        onSubmit={(e) => {
          e.preventDefault()
          e.stopPropagation()
          form.handleSubmit()
        }}
      >
        <form.Field
          name="country"
          validators={{
            onChange: ({value}) =>
              value.length === 0
                ? "At least one country must be selected"
                : undefined,
          }}
        >
          {(field) => (
            <Combobox
              className="w-full"
              collection={collection}
              errorText={field.state.meta.errors[0]}
              invalid={field.state.meta.errors.length > 0}
              label="Country"
              onInputValueChange={handleInputChange}
              onValueChange={(details) => field.handleChange(details.value)}
              placeholder="Select a country"
              required
              value={field.state.value}
            />
          )}
        </form.Field>
        <div className="mt-2 flex w-full justify-end">
          <Button
            disabled={form.state.isSubmitting}
            emphasis="primary"
            type="submit"
            variant="fill"
          >
            Submit
          </Button>
        </div>
      </form>
    </>
  )
}

Tanstack form also supports ArkType.

Explorer

React
Angular
Vue
Choose a framework

Component Anatomy

Hover to highlight, click to view API

API

<Combobox>

The simple combobox extends the Combobox.Root component with the following props:

PropTypeDefault
aria-label attribute, forwarded to the input element.
string
aria-labelledby attribute, forwarded to the input element. If you provide a label, omit this prop.
string
Props applied to the clear trigger element. To prevent this element from rendering, pass {hidden: true}
Props applied to the content element.
Props applied to the control element.
Label to render when the list is empty.
"No results found"
Props applied to the component that renders the empty message.
    {
    render?:
    | ReactElement
    | ((
    props: object,
    ) => ReactElement)
    }
    Props applied to the error indicator element.
    Optional error that describes the element when invalid is true.
    string
    Props applied to the error text element.
    Set to true to highlight option text matches during filtering.
    boolean
    Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
    Props applied to the label element.
    Props applied to the select element.
    Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.
    Props applied to the label element.
    Props applied to the portal element.
    PortalProps
    Props applied to the positioner element.
    Customize the rendering of the combobox list items.
      (
      props: Omit<
      ComboboxItemProps<T>,
      'persistFocus'
      > & {
      'data-virtual'?:
      | ''
      | undefined
      style?: CSSProperties
      },
      ) => ReactElement
      Props applied to the trigger element.
      When true, the list items will be virtually rendered. Useful for large lists.
      boolean
      Type
      string
      Description
      aria-label attribute, forwarded to the input element.
      Type
      string
      Description
      aria-labelledby attribute, forwarded to the input element. If you provide a label, omit this prop.
      Description
      Props applied to the clear trigger element. To prevent this element from rendering, pass {hidden: true}
      Description
      Props applied to the content element.
      Description
      Props applied to the control element.
      Description
      Label to render when the list is empty.
      Type
      {
      render?:
      | ReactElement
      | ((
      props: object,
      ) => ReactElement)
      }
      Description
      Props applied to the component that renders the empty message.
        Description
        Props applied to the error indicator element.
        Type
        string
        Description
        Optional error that describes the element when invalid is true.
        Description
        Props applied to the error text element.
        Type
        boolean
        Description
        Set to true to highlight option text matches during filtering.
        Description
        Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
        Description
        Props applied to the label element.
        Description
        Props applied to the select element.
        Description
        Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.
        Description
        Props applied to the label element.
        Type
        PortalProps
        Description
        Props applied to the portal element.
        Description
        Props applied to the positioner element.
        Type
        (
        props: Omit<
        ComboboxItemProps<T>,
        'persistFocus'
        > & {
        'data-virtual'?:
        | ''
        | undefined
        style?: CSSProperties
        },
        ) => ReactElement
        Description
        Customize the rendering of the combobox list items.
          Description
          Props applied to the trigger element.
          Type
          boolean
          Description
          When true, the list items will be virtually rendered. Useful for large lists.

          Composite API

          This section describes the elements of the Combobox's composite API.

          <Combobox.Root>

          Groups all parts of the combobox. Renders a <div> element by default.
          PropTypeDefault
          Whether to allow typing custom values in the input
          boolean
          Whether to always submit on Enter key press, even if popup is open. Useful for single-field autocomplete forms where Enter should submit the form.
          boolean
          false
          
          Whether to autofocus the input on mount
          boolean
          Whether to close the combobox when an item is selected.
          boolean
          The collection of items
          | ListCollection<T>
          | undefined
          Whether the combobox is a composed with other composite widgets like tabs
          boolean
          true
          
          The initial highlighted value of the combobox when rendered. Use when you don't need to control the highlighted value of the combobox.
          string | null
          The initial value of the combobox's input when rendered. Use when you don't need to control the value of the combobox's input.
          string
          ""
          
          The initial open state of the combobox when rendered. Use when you don't need to control the open state of the combobox.
          boolean
          The initial value of the combobox's selected items when rendered. Use when you don't need to control the value of the combobox's selected items.
          string[]
          []
          
          The document's text/writing direction.
          'ltr' | 'rtl'
          'ltr'
          
          Whether the combobox is disabled
          boolean
          Whether to disable registering this as a dismissable layer
          boolean
          The associate form of the combobox.
          string
          A root node to correctly resolve document in custom environments. i.e., Iframes, Electron.
            () =>
            | ShadowRoot
            | Document
            | Node
            The controlled highlighted value of the combobox
            string | null
            lucide icon, positioned at the start of the input field.
            | LucideIcon
            | ReactElement
            id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
            string
            The ids of the combobox's elements. If omitted, these will be generated automatically.
            Partial<ComboboxElementIds>
            Whether to synchronize the present change immediately or defer it to the next frame
            boolean
            Defines the auto-completion behavior of the combobox.

            -
            autohighlight: The first focused item is highlighted as the user types
            -
            autocomplete: Navigating the listbox with the arrow keys selects the item and the input is updated
            | 'autohighlight'
            | 'autocomplete'
            | 'none'
            "none"
            
            The controlled value of the combobox's input
            string
            Whether the combobox is invalid
            boolean
            When true, the component will not be rendered in the DOM until it becomes visible or active.
            boolean
            false
            
            Whether to loop the keyboard navigation through the items
            boolean
            true
            
            Whether to allow multiple selection.

            When
            multiple is true, the selectionBehavior is automatically set to clear. It's recommended to render the selected items in a separate container.
            boolean
            The name attribute of the combobox's input. Useful for form submission
            string
            Function called when the animation ends in the closed state
            VoidFunction
            Function called when the focus is moved outside the component
              | ((
              event: FocusOutsideEvent,
              ) => void)
              | undefined
              Function called when an item is highlighted using the pointer or keyboard navigation.
                (details: {
                highlightedItem: T | null
                highlightedValue:
                | string
                | null
                }) => void
                Function called when the input's value changes
                  (
                  details: ComboboxInputValueChangeDetails,
                  ) => void
                  Function called when an interaction happens outside the component
                    | ((
                    event: InteractOutsideEvent,
                    ) => void)
                    | undefined
                    Function called when the popup is opened
                      (
                      details: ComboboxOpenChangeDetails,
                      ) => void
                      Function called when the pointer is pressed down outside the component
                        | ((
                        event: PointerDownOutsideEvent,
                        ) => void)
                        | undefined
                        Function called when an item is selected
                          (details: {
                          itemValue: string
                          value: string[]
                          }) => void
                          Function called when a new item is selected
                            (details: {
                            items: Array<T>
                            value: string[]
                            }) => void
                            The controlled open state of the combobox
                            boolean
                            Whether to show the combobox when the input value changes
                            | boolean
                            | ((
                            details: ComboboxInputValueChangeDetails,
                            ) => boolean)
                            true
                            
                            Whether to open the combobox popup on initial click on the input
                            boolean
                            false
                            
                            Whether to open the combobox on arrow key press
                            boolean
                            true
                            
                            The placeholder text of the combobox's input
                            string
                            The positioning options to dynamically position the popup menu
                            | ComboboxPositioningOptions
                            | undefined
                            Whether the node is present (controlled by the user)
                            boolean
                            Whether the combobox is readonly. This puts the combobox in a "non-editable" mode but the user can still interact with it
                            boolean
                            Allows you to replace the component's HTML element with a different tag or component. Learn more
                            | ReactElement
                            | ((
                            props: object,
                            ) => ReactElement)
                            Whether the combobox is a required input field
                            boolean
                            Function to scroll to a specific index
                              (details: {
                              getElement: () => HTMLElement | null
                              immediate?:
                              | boolean
                              | undefined
                              index: number
                              }) => void
                              The behavior of the combobox input when an item is selected

                              -
                              replace: The selected item string is set as the input value
                              -
                              clear: The input value is cleared
                              -
                              preserve: The input value is preserved
                              | 'clear'
                              | 'replace'
                              | 'preserve'
                              "replace"
                              
                              Visual indicator style for selected items. Use "checkbox" for multi-select with always-visible checkboxes on the left, or "checkmark" for a checkmark icon on the right that only appears when selected.
                              | 'checkmark'
                              | 'checkbox'
                              'checkmark'
                              
                              The size of the select and its elements. Governs properties like font size, item padding, and icon sizes.
                              | 'sm'
                              | 'md'
                              | 'lg'
                              'md'
                              
                              Whether to allow the initial presence animation.
                              boolean
                              false
                              
                              Specifies the localized strings that identifies the accessibility elements and their states
                                {
                                clearTriggerLabel?:
                                | string
                                | undefined
                                triggerLabel?:
                                | string
                                | undefined
                                }
                                When true, the component will be completely removed from the DOM when it becomes inactive or hidden, rather than just being hidden with CSS.
                                boolean
                                false
                                
                                The controlled value of the combobox's selected items
                                string[]
                                Type
                                boolean
                                Description
                                Whether to allow typing custom values in the input
                                Type
                                boolean
                                Description
                                Whether to always submit on Enter key press, even if popup is open. Useful for single-field autocomplete forms where Enter should submit the form.
                                Type
                                boolean
                                Description
                                Whether to autofocus the input on mount
                                Type
                                boolean
                                Description
                                Whether to close the combobox when an item is selected.
                                Type
                                | ListCollection<T>
                                | undefined
                                Description
                                The collection of items
                                Type
                                boolean
                                Description
                                Whether the combobox is a composed with other composite widgets like tabs
                                Type
                                string | null
                                Description
                                The initial highlighted value of the combobox when rendered. Use when you don't need to control the highlighted value of the combobox.
                                Type
                                string
                                Description
                                The initial value of the combobox's input when rendered. Use when you don't need to control the value of the combobox's input.
                                Type
                                boolean
                                Description
                                The initial open state of the combobox when rendered. Use when you don't need to control the open state of the combobox.
                                Type
                                string[]
                                Description
                                The initial value of the combobox's selected items when rendered. Use when you don't need to control the value of the combobox's selected items.
                                Type
                                'ltr' | 'rtl'
                                Description
                                The document's text/writing direction.
                                Type
                                boolean
                                Description
                                Whether the combobox is disabled
                                Type
                                boolean
                                Description
                                Whether to disable registering this as a dismissable layer
                                Type
                                string
                                Description
                                The associate form of the combobox.
                                Type
                                () =>
                                | ShadowRoot
                                | Document
                                | Node
                                Description
                                A root node to correctly resolve document in custom environments. i.e., Iframes, Electron.
                                  Type
                                  string | null
                                  Description
                                  The controlled highlighted value of the combobox
                                  Type
                                  | LucideIcon
                                  | ReactElement
                                  Description
                                  lucide icon, positioned at the start of the input field.
                                  Type
                                  string
                                  Description
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  Type
                                  Partial<ComboboxElementIds>
                                  Description
                                  The ids of the combobox's elements. If omitted, these will be generated automatically.
                                  Type
                                  boolean
                                  Description
                                  Whether to synchronize the present change immediately or defer it to the next frame
                                  Type
                                  | 'autohighlight'
                                  | 'autocomplete'
                                  | 'none'
                                  Description
                                  Defines the auto-completion behavior of the combobox.

                                  -
                                  autohighlight: The first focused item is highlighted as the user types
                                  -
                                  autocomplete: Navigating the listbox with the arrow keys selects the item and the input is updated
                                  Type
                                  string
                                  Description
                                  The controlled value of the combobox's input
                                  Type
                                  boolean
                                  Description
                                  Whether the combobox is invalid
                                  Type
                                  boolean
                                  Description
                                  When true, the component will not be rendered in the DOM until it becomes visible or active.
                                  Type
                                  boolean
                                  Description
                                  Whether to loop the keyboard navigation through the items
                                  Type
                                  boolean
                                  Description
                                  Whether to allow multiple selection.

                                  When
                                  multiple is true, the selectionBehavior is automatically set to clear. It's recommended to render the selected items in a separate container.
                                  Type
                                  string
                                  Description
                                  The name attribute of the combobox's input. Useful for form submission
                                  Type
                                  VoidFunction
                                  Description
                                  Function called when the animation ends in the closed state
                                  Type
                                  | ((
                                  event: FocusOutsideEvent,
                                  ) => void)
                                  | undefined
                                  Description
                                  Function called when the focus is moved outside the component
                                    Type
                                    (details: {
                                    highlightedItem: T | null
                                    highlightedValue:
                                    | string
                                    | null
                                    }) => void
                                    Description
                                    Function called when an item is highlighted using the pointer or keyboard navigation.
                                      Type
                                      (
                                      details: ComboboxInputValueChangeDetails,
                                      ) => void
                                      Description
                                      Function called when the input's value changes
                                        Type
                                        | ((
                                        event: InteractOutsideEvent,
                                        ) => void)
                                        | undefined
                                        Description
                                        Function called when an interaction happens outside the component
                                          Type
                                          (
                                          details: ComboboxOpenChangeDetails,
                                          ) => void
                                          Description
                                          Function called when the popup is opened
                                            Type
                                            | ((
                                            event: PointerDownOutsideEvent,
                                            ) => void)
                                            | undefined
                                            Description
                                            Function called when the pointer is pressed down outside the component
                                              Type
                                              (details: {
                                              itemValue: string
                                              value: string[]
                                              }) => void
                                              Description
                                              Function called when an item is selected
                                                Type
                                                (details: {
                                                items: Array<T>
                                                value: string[]
                                                }) => void
                                                Description
                                                Function called when a new item is selected
                                                  Type
                                                  boolean
                                                  Description
                                                  The controlled open state of the combobox
                                                  Type
                                                  | boolean
                                                  | ((
                                                  details: ComboboxInputValueChangeDetails,
                                                  ) => boolean)
                                                  Description
                                                  Whether to show the combobox when the input value changes
                                                  Type
                                                  boolean
                                                  Description
                                                  Whether to open the combobox popup on initial click on the input
                                                  Type
                                                  boolean
                                                  Description
                                                  Whether to open the combobox on arrow key press
                                                  Type
                                                  string
                                                  Description
                                                  The placeholder text of the combobox's input
                                                  Type
                                                  | ComboboxPositioningOptions
                                                  | undefined
                                                  Description
                                                  The positioning options to dynamically position the popup menu
                                                  Type
                                                  boolean
                                                  Description
                                                  Whether the node is present (controlled by the user)
                                                  Type
                                                  boolean
                                                  Description
                                                  Whether the combobox is readonly. This puts the combobox in a "non-editable" mode but the user can still interact with it
                                                  Type
                                                  | ReactElement
                                                  | ((
                                                  props: object,
                                                  ) => ReactElement)
                                                  Description
                                                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                  Type
                                                  boolean
                                                  Description
                                                  Whether the combobox is a required input field
                                                  Type
                                                  (details: {
                                                  getElement: () => HTMLElement | null
                                                  immediate?:
                                                  | boolean
                                                  | undefined
                                                  index: number
                                                  }) => void
                                                  Description
                                                  Function to scroll to a specific index
                                                    Type
                                                    | 'clear'
                                                    | 'replace'
                                                    | 'preserve'
                                                    Description
                                                    The behavior of the combobox input when an item is selected

                                                    -
                                                    replace: The selected item string is set as the input value
                                                    -
                                                    clear: The input value is cleared
                                                    -
                                                    preserve: The input value is preserved
                                                    Type
                                                    | 'checkmark'
                                                    | 'checkbox'
                                                    Description
                                                    Visual indicator style for selected items. Use "checkbox" for multi-select with always-visible checkboxes on the left, or "checkmark" for a checkmark icon on the right that only appears when selected.
                                                    Type
                                                    | 'sm'
                                                    | 'md'
                                                    | 'lg'
                                                    Description
                                                    The size of the select and its elements. Governs properties like font size, item padding, and icon sizes.
                                                    Type
                                                    boolean
                                                    Description
                                                    Whether to allow the initial presence animation.
                                                    Type
                                                    {
                                                    clearTriggerLabel?:
                                                    | string
                                                    | undefined
                                                    triggerLabel?:
                                                    | string
                                                    | undefined
                                                    }
                                                    Description
                                                    Specifies the localized strings that identifies the accessibility elements and their states
                                                      Type
                                                      boolean
                                                      Description
                                                      When true, the component will be completely removed from the DOM when it becomes inactive or hidden, rather than just being hidden with CSS.
                                                      Type
                                                      string[]
                                                      Description
                                                      The controlled value of the combobox's selected items

                                                      <Combobox.Label>

                                                      Label text associated with the combobox. Renders a <label> element by default.
                                                      PropType
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.Control>

                                                      Container for the input element and associated controls. Renders a <div> element by default.
                                                      PropType
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.Input>

                                                      {}

                                                      <Combobox.Trigger>

                                                      Icon that indicates the open/close state of the combobox's associated panel. Renders a <button> element by default.
                                                      PropTypeDefault
                                                      Whether the trigger is focusable
                                                      boolean
                                                      Dropdown visibility indicator icon. This automatically rotates when the dropdown is visible.
                                                      | LucideIcon
                                                      | ReactElement
                                                      ChevronDown
                                                      
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      boolean
                                                      Description
                                                      Whether the trigger is focusable
                                                      Type
                                                      | LucideIcon
                                                      | ReactElement
                                                      Description
                                                      Dropdown visibility indicator icon. This automatically rotates when the dropdown is visible.
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.ClearTrigger>

                                                      Button that clears the input value. Renders a <button> element by default.
                                                      PropType
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.Positioner>

                                                      Positions the combobox menu relative to the control. Renders a <div> element by default.
                                                      PropType
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.Content>

                                                      Container for the combobox options. Renders a <div> element by default.
                                                      PropType
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.Item>

                                                      Individual option within the combobox menu. Renders a <div> element by default.
                                                      PropType
                                                      The item to render
                                                      T
                                                      Whether hovering outside should clear the highlighted state
                                                      boolean
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      T
                                                      Description
                                                      The item to render
                                                      Type
                                                      boolean
                                                      Description
                                                      Whether hovering outside should clear the highlighted state
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.ItemIndicator>

                                                      Visual indicator showing the selected state of an item. Renders a <span> element by default.
                                                      PropTypeDefault
                                                      React children prop.
                                                      <Icon icon={Check}/>
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      React children prop.
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.ItemText>

                                                      Text content of a combobox item. Renders a <span> element by default.
                                                      PropType
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.Hint>

                                                      Helper text displayed below the input. Renders a <div> element by default.
                                                      PropType
                                                      React children prop.
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      React children prop.
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.ErrorText>

                                                      Error message displayed when the input is invalid. Renders a <div> element by default.
                                                      PropType
                                                      An icon to display next to the error text.
                                                      | LucideIcon
                                                      | ReactElement
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | LucideIcon
                                                      | ReactElement
                                                      Description
                                                      An icon to display next to the error text.
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Combobox.ErrorIndicator>

                                                      Visual indicator displayed when the input is invalid. Renders a <div> element by default.
                                                      PropTypeDefault
                                                      lucide-react icon or ReactNode.
                                                      | LucideIcon
                                                      | ReactElement
                                                      CircleAlert
                                                      
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | LucideIcon
                                                      | ReactElement
                                                      Description
                                                      lucide-react icon or ReactNode.
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      Data Structures

                                                      ListCollection

                                                      The following describes the member variables and methods of the ListCollection class. The Combobox component uses an instance of this class as input:

                                                      const collection = comboboxCollection({
                                                        items: [
                                                          // ...
                                                        ],
                                                      })
                                                      
                                                      return <Combobox collection={collection} />

                                                      Note that the ListCollection accepts a single generic type parameter, T, which is the type of each list item used in the collection. This can be a string or an object.

                                                      Constructor

                                                      PropType
                                                      Function to group items
                                                        (
                                                        item: T,
                                                        index: number,
                                                        ) => string
                                                        Function to sort items
                                                        | ((
                                                        a: string,
                                                        b: string,
                                                        ) => number)
                                                        | string[]
                                                        | 'asc'
                                                        | 'desc'
                                                        Function to determine if a node is disabled.
                                                          (
                                                          item: T,
                                                          ) => boolean | undefined
                                                          Function to get the item's label. This is the string used for filtering.
                                                            (
                                                            item: T,
                                                            ) => string
                                                            The options of the select
                                                            | Iterable<T>
                                                            | Readonly<Iterable<T>>
                                                            Function to get the item's unique value.
                                                              (
                                                              item: T,
                                                              ) => string
                                                              Type
                                                              (
                                                              item: T,
                                                              index: number,
                                                              ) => string
                                                              Description
                                                              Function to group items
                                                                Type
                                                                | ((
                                                                a: string,
                                                                b: string,
                                                                ) => number)
                                                                | string[]
                                                                | 'asc'
                                                                | 'desc'
                                                                Description
                                                                Function to sort items
                                                                Type
                                                                (
                                                                item: T,
                                                                ) => boolean | undefined
                                                                Description
                                                                Function to determine if a node is disabled.
                                                                  Type
                                                                  (
                                                                  item: T,
                                                                  ) => string
                                                                  Description
                                                                  Function to get the item's label. This is the string used for filtering.
                                                                    Type
                                                                    | Iterable<T>
                                                                    | Readonly<Iterable<T>>
                                                                    Description
                                                                    The options of the select
                                                                    Type
                                                                    (
                                                                    item: T,
                                                                    ) => string
                                                                    Description
                                                                    Function to get the item's unique value.
                                                                      A collection of list items, commonly used in Select and Combobox components.
                                                                      PropType
                                                                      Append items to the collection
                                                                      (
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Get the item based on its index
                                                                      (
                                                                      index: number,
                                                                      ) => T | null
                                                                      Compare two values
                                                                      (
                                                                      a: string,
                                                                      b: string,
                                                                      ) => 1 | -1 | 0
                                                                      Copy the collection
                                                                      (
                                                                      items?: Array<T>,
                                                                      ) => ListCollection<T>
                                                                      Filter the collection
                                                                      (
                                                                      fn: (
                                                                      itemString: string,
                                                                      index: number,
                                                                      item: T,
                                                                      ) => boolean,
                                                                      ) => ListCollection<T>
                                                                      Get the item based on its value
                                                                      (
                                                                      value:
                                                                      | string
                                                                      | null
                                                                      | undefined,
                                                                      ) => T | null
                                                                      Get the items based on its values
                                                                      (
                                                                      values: string[],
                                                                      ) => Array<T>
                                                                      Returns the first value in the collection
                                                                      string | null
                                                                      Whether an item is disabled
                                                                      (
                                                                      item: T | null,
                                                                      ) => boolean | undefined
                                                                      Convert an item to a value
                                                                      (
                                                                      item: T | null | undefined,
                                                                      ) => string | null
                                                                      Returns the next value in the collection
                                                                      (
                                                                      value: string,
                                                                      step?: number,
                                                                      clamp?: boolean,
                                                                      ) => string | null
                                                                      Returns the previous value in the collection
                                                                      (
                                                                      value: string,
                                                                      step?: number,
                                                                      clamp?: boolean,
                                                                      ) => string | null
                                                                      Get the range of values between two values
                                                                      (
                                                                      from: string | null,
                                                                      to: string | null,
                                                                      ) => string[]
                                                                      Returns all the values in the collection
                                                                      (
                                                                      items?: Array<T>,
                                                                      ) => string[]
                                                                      Group items by the groupBy function provided in options Returns an array of [groupKey, items] tuples
                                                                      () => Array<
                                                                      [string, Array<T>]
                                                                      >
                                                                      Whether the collection has a value
                                                                      (
                                                                      value: string | null,
                                                                      ) => boolean
                                                                      Whether the collection has an item
                                                                      (
                                                                      item: T | null,
                                                                      ) => boolean
                                                                      Get the index of an item based on its key
                                                                      (
                                                                      value: string | null,
                                                                      ) => number
                                                                      Insert items at a specific index
                                                                      (
                                                                      index: number,
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Insert items after a specific value
                                                                      (
                                                                      value: string,
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Insert items before a specific value
                                                                      (
                                                                      value: string,
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Check if the collection is equal to another collection
                                                                      (
                                                                      other: ListCollection<T>,
                                                                      ) => boolean
                                                                      The items in the collection
                                                                      Array<T>
                                                                      Returns the last value in the collection
                                                                      string | null
                                                                      Move an item to a specific index
                                                                      (
                                                                      value: string,
                                                                      toIndex: number,
                                                                      ) => ListCollection<T>
                                                                      Move items after a specific value
                                                                      (
                                                                      value: string,
                                                                      ...values: string[]
                                                                      ) => ListCollection<T>
                                                                      Move items before a specific value
                                                                      (
                                                                      value: string,
                                                                      ...values: string[]
                                                                      ) => ListCollection<T>
                                                                      Prepend items to the collection
                                                                      (
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Remove items from the collection
                                                                      (
                                                                      ...itemsOrValues: Array<
                                                                      string | T
                                                                      >
                                                                      ) => ListCollection<T>
                                                                      Reorder items
                                                                      (
                                                                      fromIndex: number,
                                                                      toIndex: number,
                                                                      ) => ListCollection<T>
                                                                      Search for a value based on a query
                                                                      (
                                                                      queryString: string,
                                                                      options: CollectionSearchOptions,
                                                                      ) => string | null
                                                                      Function to update the collection items
                                                                      (
                                                                      items: Array<T>,
                                                                      ) => ListCollection<T>
                                                                      Returns the number of items in the collection
                                                                      number
                                                                      Sort the values based on their index
                                                                      (
                                                                      values: string[],
                                                                      ) => string[]
                                                                      Convert a value to a string
                                                                      (
                                                                      value: string | null,
                                                                      ) => string | null
                                                                      Convert an item to a string
                                                                      (
                                                                      item: T | null,
                                                                      ) => string | null
                                                                      Convert an array of items to a string
                                                                      (
                                                                      items: Array<T>,
                                                                      separator?: string,
                                                                      ) => string
                                                                      Convert an array of items to a string
                                                                      (
                                                                      value: string[],
                                                                      separator?: string,
                                                                      ) => string
                                                                      Convert the collection to a JSON object
                                                                      () => {
                                                                      first: string | null
                                                                      last: string | null
                                                                      size: number
                                                                      }
                                                                      Convert the collection to a string
                                                                      () => string
                                                                      Update an item in the collection
                                                                      (
                                                                      value: string,
                                                                      item: T,
                                                                      ) => ListCollection<T>
                                                                      Update an item in the collection if it exists, otherwise append it
                                                                      (
                                                                      value: string,
                                                                      item: T,
                                                                      mode?: 'append' | 'prepend',
                                                                      ) => ListCollection<T>
                                                                      Type
                                                                      (
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Append items to the collection
                                                                      Type
                                                                      (
                                                                      index: number,
                                                                      ) => T | null
                                                                      Description
                                                                      Get the item based on its index
                                                                      Type
                                                                      (
                                                                      a: string,
                                                                      b: string,
                                                                      ) => 1 | -1 | 0
                                                                      Description
                                                                      Compare two values
                                                                      Type
                                                                      (
                                                                      items?: Array<T>,
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Copy the collection
                                                                      Type
                                                                      (
                                                                      fn: (
                                                                      itemString: string,
                                                                      index: number,
                                                                      item: T,
                                                                      ) => boolean,
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Filter the collection
                                                                      Type
                                                                      (
                                                                      value:
                                                                      | string
                                                                      | null
                                                                      | undefined,
                                                                      ) => T | null
                                                                      Description
                                                                      Get the item based on its value
                                                                      Type
                                                                      (
                                                                      values: string[],
                                                                      ) => Array<T>
                                                                      Description
                                                                      Get the items based on its values
                                                                      Type
                                                                      string | null
                                                                      Description
                                                                      Returns the first value in the collection
                                                                      Type
                                                                      (
                                                                      item: T | null,
                                                                      ) => boolean | undefined
                                                                      Description
                                                                      Whether an item is disabled
                                                                      Type
                                                                      (
                                                                      item: T | null | undefined,
                                                                      ) => string | null
                                                                      Description
                                                                      Convert an item to a value
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      step?: number,
                                                                      clamp?: boolean,
                                                                      ) => string | null
                                                                      Description
                                                                      Returns the next value in the collection
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      step?: number,
                                                                      clamp?: boolean,
                                                                      ) => string | null
                                                                      Description
                                                                      Returns the previous value in the collection
                                                                      Type
                                                                      (
                                                                      from: string | null,
                                                                      to: string | null,
                                                                      ) => string[]
                                                                      Description
                                                                      Get the range of values between two values
                                                                      Type
                                                                      (
                                                                      items?: Array<T>,
                                                                      ) => string[]
                                                                      Description
                                                                      Returns all the values in the collection
                                                                      Type
                                                                      () => Array<
                                                                      [string, Array<T>]
                                                                      >
                                                                      Description
                                                                      Group items by the groupBy function provided in options Returns an array of [groupKey, items] tuples
                                                                      Type
                                                                      (
                                                                      value: string | null,
                                                                      ) => boolean
                                                                      Description
                                                                      Whether the collection has a value
                                                                      Type
                                                                      (
                                                                      item: T | null,
                                                                      ) => boolean
                                                                      Description
                                                                      Whether the collection has an item
                                                                      Type
                                                                      (
                                                                      value: string | null,
                                                                      ) => number
                                                                      Description
                                                                      Get the index of an item based on its key
                                                                      Type
                                                                      (
                                                                      index: number,
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Insert items at a specific index
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Insert items after a specific value
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Insert items before a specific value
                                                                      Type
                                                                      (
                                                                      other: ListCollection<T>,
                                                                      ) => boolean
                                                                      Description
                                                                      Check if the collection is equal to another collection
                                                                      Type
                                                                      Array<T>
                                                                      Description
                                                                      The items in the collection
                                                                      Type
                                                                      string | null
                                                                      Description
                                                                      Returns the last value in the collection
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      toIndex: number,
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Move an item to a specific index
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      ...values: string[]
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Move items after a specific value
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      ...values: string[]
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Move items before a specific value
                                                                      Type
                                                                      (
                                                                      ...items: Array<T>
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Prepend items to the collection
                                                                      Type
                                                                      (
                                                                      ...itemsOrValues: Array<
                                                                      string | T
                                                                      >
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Remove items from the collection
                                                                      Type
                                                                      (
                                                                      fromIndex: number,
                                                                      toIndex: number,
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Reorder items
                                                                      Type
                                                                      (
                                                                      queryString: string,
                                                                      options: CollectionSearchOptions,
                                                                      ) => string | null
                                                                      Description
                                                                      Search for a value based on a query
                                                                      Type
                                                                      (
                                                                      items: Array<T>,
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Function to update the collection items
                                                                      Type
                                                                      number
                                                                      Description
                                                                      Returns the number of items in the collection
                                                                      Type
                                                                      (
                                                                      values: string[],
                                                                      ) => string[]
                                                                      Description
                                                                      Sort the values based on their index
                                                                      Type
                                                                      (
                                                                      value: string | null,
                                                                      ) => string | null
                                                                      Description
                                                                      Convert a value to a string
                                                                      Type
                                                                      (
                                                                      item: T | null,
                                                                      ) => string | null
                                                                      Description
                                                                      Convert an item to a string
                                                                      Type
                                                                      (
                                                                      items: Array<T>,
                                                                      separator?: string,
                                                                      ) => string
                                                                      Description
                                                                      Convert an array of items to a string
                                                                      Type
                                                                      (
                                                                      value: string[],
                                                                      separator?: string,
                                                                      ) => string
                                                                      Description
                                                                      Convert an array of items to a string
                                                                      Type
                                                                      () => {
                                                                      first: string | null
                                                                      last: string | null
                                                                      size: number
                                                                      }
                                                                      Description
                                                                      Convert the collection to a JSON object
                                                                      Type
                                                                      () => string
                                                                      Description
                                                                      Convert the collection to a string
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      item: T,
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Update an item in the collection
                                                                      Type
                                                                      (
                                                                      value: string,
                                                                      item: T,
                                                                      mode?: 'append' | 'prepend',
                                                                      ) => ListCollection<T>
                                                                      Description
                                                                      Update an item in the collection if it exists, otherwise append it

                                                                      ComboboxPositioningOptions

                                                                      PropTypeDefault
                                                                      The minimum padding between the arrow and the floating element's corner.
                                                                      number
                                                                      4
                                                                      
                                                                      CSS selector used to locate the arrow element within the floating element. Components override this with their own anatomy-namespaced selector (e.g. [data-menu-part=arrow]).
                                                                      string
                                                                      The overflow boundary of the reference element
                                                                      () =>
                                                                      | 'clippingAncestors'
                                                                      | Element
                                                                      | Array<Element>
                                                                      | {
                                                                      height: number
                                                                      width: number
                                                                      x: number
                                                                      y: number
                                                                      }
                                                                      CSS selector for the content element whose z-index is copied to the floating element. Falls back to the first child.
                                                                      string
                                                                      Whether the popover should fit the viewport.
                                                                      boolean
                                                                      Whether to flip the placement when the floating element overflows the boundary.
                                                                      | boolean
                                                                      | Array<
                                                                      | 'bottom'
                                                                      | 'bottom-end'
                                                                      | 'bottom-start'
                                                                      | 'left'
                                                                      | 'left-end'
                                                                      | 'left-start'
                                                                      | 'right'
                                                                      | 'right-end'
                                                                      | 'right-start'
                                                                      | 'top'
                                                                      | 'top-end'
                                                                      | 'top-start'
                                                                      >
                                                                      true
                                                                      
                                                                      Function that returns the anchor rect
                                                                      (
                                                                      element:
                                                                      | HTMLElement
                                                                      | VirtualElement
                                                                      | null,
                                                                      ) => AnchorRect | null
                                                                      The main axis offset or gap between the reference and floating element
                                                                      number
                                                                      2
                                                                      
                                                                      Whether the popover should be hidden when the reference element is detached
                                                                      boolean
                                                                      Options to activate auto-update listeners
                                                                      | boolean
                                                                      | AutoUpdateOptions
                                                                      true
                                                                      
                                                                      The offset of the floating element
                                                                      {
                                                                      crossAxis?: number
                                                                      mainAxis?: number
                                                                      }
                                                                      Function called when the placement is computed
                                                                      (
                                                                      data: ComputePositionReturn,
                                                                      ) => void
                                                                      Function called when the floating element is positioned or not
                                                                      (data: {
                                                                      placed: boolean
                                                                      }) => void
                                                                      The virtual padding around the viewport edges to check for overflow
                                                                      number
                                                                      Whether the floating element can overlap the reference element
                                                                      boolean
                                                                      false
                                                                      
                                                                      The initial placement of the floating element
                                                                      | 'bottom'
                                                                      | 'bottom-end'
                                                                      | 'bottom-start'
                                                                      | 'left'
                                                                      | 'left-end'
                                                                      | 'left-start'
                                                                      | 'right'
                                                                      | 'right-end'
                                                                      | 'right-start'
                                                                      | 'top'
                                                                      | 'top-end'
                                                                      | 'top-start'
                                                                      'bottom-start'
                                                                      
                                                                      Whether to make the floating element same width as the reference element
                                                                      boolean
                                                                      true
                                                                      
                                                                      The secondary axis offset or gap between the reference and floating elements
                                                                      number
                                                                      Whether the popover should slide when it overflows.
                                                                      boolean
                                                                      The strategy to use for positioning
                                                                      | 'absolute'
                                                                      | 'fixed'
                                                                      'absolute'
                                                                      
                                                                      A callback that will be called when the popover needs to calculate its position.
                                                                      (data: {
                                                                      updatePosition: () => Promise<void>
                                                                      }) => void | Promise<void>
                                                                      Type
                                                                      number
                                                                      Description
                                                                      The minimum padding between the arrow and the floating element's corner.
                                                                      Type
                                                                      string
                                                                      Description
                                                                      CSS selector used to locate the arrow element within the floating element. Components override this with their own anatomy-namespaced selector (e.g. [data-menu-part=arrow]).
                                                                      Type
                                                                      () =>
                                                                      | 'clippingAncestors'
                                                                      | Element
                                                                      | Array<Element>
                                                                      | {
                                                                      height: number
                                                                      width: number
                                                                      x: number
                                                                      y: number
                                                                      }
                                                                      Description
                                                                      The overflow boundary of the reference element
                                                                      Type
                                                                      string
                                                                      Description
                                                                      CSS selector for the content element whose z-index is copied to the floating element. Falls back to the first child.
                                                                      Type
                                                                      boolean
                                                                      Description
                                                                      Whether the popover should fit the viewport.
                                                                      Type
                                                                      | boolean
                                                                      | Array<
                                                                      | 'bottom'
                                                                      | 'bottom-end'
                                                                      | 'bottom-start'
                                                                      | 'left'
                                                                      | 'left-end'
                                                                      | 'left-start'
                                                                      | 'right'
                                                                      | 'right-end'
                                                                      | 'right-start'
                                                                      | 'top'
                                                                      | 'top-end'
                                                                      | 'top-start'
                                                                      >
                                                                      Description
                                                                      Whether to flip the placement when the floating element overflows the boundary.
                                                                      Type
                                                                      (
                                                                      element:
                                                                      | HTMLElement
                                                                      | VirtualElement
                                                                      | null,
                                                                      ) => AnchorRect | null
                                                                      Description
                                                                      Function that returns the anchor rect
                                                                      Type
                                                                      number
                                                                      Description
                                                                      The main axis offset or gap between the reference and floating element
                                                                      Type
                                                                      boolean
                                                                      Description
                                                                      Whether the popover should be hidden when the reference element is detached
                                                                      Type
                                                                      | boolean
                                                                      | AutoUpdateOptions
                                                                      Description
                                                                      Options to activate auto-update listeners
                                                                      Type
                                                                      {
                                                                      crossAxis?: number
                                                                      mainAxis?: number
                                                                      }
                                                                      Description
                                                                      The offset of the floating element
                                                                      Type
                                                                      (
                                                                      data: ComputePositionReturn,
                                                                      ) => void
                                                                      Description
                                                                      Function called when the placement is computed
                                                                      Type
                                                                      (data: {
                                                                      placed: boolean
                                                                      }) => void
                                                                      Description
                                                                      Function called when the floating element is positioned or not
                                                                      Type
                                                                      number
                                                                      Description
                                                                      The virtual padding around the viewport edges to check for overflow
                                                                      Type
                                                                      boolean
                                                                      Description
                                                                      Whether the floating element can overlap the reference element
                                                                      Type
                                                                      | 'bottom'
                                                                      | 'bottom-end'
                                                                      | 'bottom-start'
                                                                      | 'left'
                                                                      | 'left-end'
                                                                      | 'left-start'
                                                                      | 'right'
                                                                      | 'right-end'
                                                                      | 'right-start'
                                                                      | 'top'
                                                                      | 'top-end'
                                                                      | 'top-start'
                                                                      Description
                                                                      The initial placement of the floating element
                                                                      Type
                                                                      boolean
                                                                      Description
                                                                      Whether to make the floating element same width as the reference element
                                                                      Type
                                                                      number
                                                                      Description
                                                                      The secondary axis offset or gap between the reference and floating elements
                                                                      Type
                                                                      boolean
                                                                      Description
                                                                      Whether the popover should slide when it overflows.
                                                                      Type
                                                                      | 'absolute'
                                                                      | 'fixed'
                                                                      Description
                                                                      The strategy to use for positioning
                                                                      Type
                                                                      (data: {
                                                                      updatePosition: () => Promise<void>
                                                                      }) => void | Promise<void>
                                                                      Description
                                                                      A callback that will be called when the popover needs to calculate its position.
                                                                      Updated by Ryan Bower