Use a Listbox to present a persistent, keyboard-navigable set of options where users choose one or more items.

import {Listbox} from "@qualcomm-ui/react/listbox"

Overview

  • Each listbox uses the listCollection helper to manage the list of items. This ListCollection instance is documented below.

Examples

Filtering

Filter a single-select collection before rendering the Listbox items.

Deployment region
Germany
United States
Singapore
Australia
Japan
United States

<Listbox.Root collection={collection} selectionMode="single">
  <Listbox.Input
    className="mb-4"
    label="Filter regions"
    onValueChange={filter}
    placeholder="Search regions"
    startIcon={Search}
  />
  <Listbox.Label>Deployment region</Listbox.Label>
  <Listbox.Content>
    {collection.items.map((region) => (
      <Listbox.Item key={region.value} item={region}>
        <Listbox.ItemControl />
        <Listbox.ItemLabel>{region.label}</Listbox.ItemLabel>
        <Listbox.ItemDescription>
          {region.description}
        </Listbox.ItemDescription>
      </Listbox.Item>
    ))}
  </Listbox.Content>
</Listbox.Root>

Multiple selection

Set selectionMode to multiple when users can choose more than one option.

Assign reviewers
Product design
Frontend engineering
Accessibility
Quality engineering
Developer experience
Release engineering
<Listbox.Root collection={collection} selectionMode="multiple">
  <Listbox.Label>Assign reviewers</Listbox.Label>
  <Listbox.Content>
    {collection.items.map((reviewer) => (
      <Listbox.Item key={reviewer.value} item={reviewer}>
        <Listbox.ItemControl />
        <Listbox.ItemLabel>{reviewer.label}</Listbox.ItemLabel>
        <Listbox.ItemDescription>
          {reviewer.description}
        </Listbox.ItemDescription>
      </Listbox.Item>
    ))}
  </Listbox.Content>
</Listbox.Root>

Scrollable

Set a maximum height and vertical overflow on Listbox.Content when the collection exceeds the available space.

Device
<Listbox.Label>Device</Listbox.Label>
<Listbox.Content className="max-h-64 overflow-y-auto">
  {collection.items.map((device) => (
    <Listbox.Item key={device} item={device}>
      <Listbox.ItemControl />
      <Listbox.ItemLabel>{device}</Listbox.ItemLabel>
    </Listbox.Item>
  ))}
</Listbox.Content>

Controlled state

Pass value and update it in onValueChange when the selected items change.

Appearance

Selected: Auto

<Listbox.Root
  collection={collection}
  onValueChange={({value}) => setValue(value)}
  value={value}
>
  <Listbox.Label>Appearance</Listbox.Label>
  <Listbox.Content>
    {collection.items.map((item) => (
      <Listbox.Item key={item} item={item}>
        <Listbox.ItemControl />
        <Listbox.ItemLabel>{item}</Listbox.ItemLabel>
      </Listbox.Item>
    ))}
  </Listbox.Content>
</Listbox.Root>
<p className="mt-2">Selected: {value.join(", ") || "None"}</p>

Item customization

Customize each item using the List.Item subcomponents.

Projects
Backend
API
React application
Client
CLI
Client
<Listbox.Label>Projects</Listbox.Label>
<Listbox.Content>
  {collection.items.map((project) => (
    <Listbox.Item key={project.value} item={project}>
      <Listbox.ItemStartIcon icon={project.icon} />
      <Listbox.ItemLabel>{project.label}</Listbox.ItemLabel>
      <Listbox.ItemDescription>
        {project.description}
      </Listbox.ItemDescription>
      <Listbox.ItemSecondaryText>
        {project.technologyArea}
      </Listbox.ItemSecondaryText>
    </Listbox.Item>
  ))}
</Listbox.Content>

API

<Listbox.Root>

Groups all parts of the listbox. Renders a <div> element by default.
PropTypeDefault
The item collection
The initial value of the highlighted item when opened. Use when you don't need to control the highlighted value of the listbox.
string
The initial default value of the listbox when rendered. Use when you don't need to control the value of the listbox.
string[]
[]
Whether to disallow empty selection
boolean
The document's text/writing direction.
'ltr' | 'rtl'
'ltr'
Whether the listbox is disabled
boolean
Whether to disallow selecting all items when meta+a is pressed
boolean
A root node to correctly resolve document in custom environments. i.e., Iframes, Electron.
      () =>
      | Node
      | ShadowRoot
      | Document
      The controlled key of the highlighted item
      string
      id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
      string
      Whether to loop the keyboard navigation through the options
      boolean
      false
      
      The callback fired when the highlighted item changes.
          (details: {
          highlightedIndex: number
          highlightedItem: T
          highlightedValue: string
          }) => void
          Function called when an item is selected
              (details: {
              value: string
              }) => void
              The callback fired when the selected item changes.
                  (details: {
                  items: Array<T>
                  value: string[]
                  }) => void
                  The orientation of the listbox.
                  | 'horizontal'
                  | 'vertical'
                  "vertical"
                  
                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                  | ReactElement
                  | ((
                  props: object,
                  ) => ReactElement)
                  Function to scroll to a specific index
                      (details: {
                      getElement: () => HTMLElement
                      immediate?: boolean
                      index: number
                      }) => void
                      How multiple selection should behave in the listbox.

                      -
                      single: The user can select a single item.
                      -
                      multiple: The user can select multiple items without using modifier keys.
                      -
                      extended: The user can select multiple items by using modifier keys.
                      | 'single'
                      | 'multiple'
                      | 'none'
                      | 'extended'
                      "single"
                      
                      Whether to select the item when it is highlighted
                      boolean
                      | 'sm'
                      | 'md'
                      | 'lg'
                      "sm"
                      
                      Whether to enable typeahead on the listbox
                      boolean
                      The controlled keys of the selected items
                      string[]
                      Description
                      The item collection
                      Type
                      string
                      Description
                      The initial value of the highlighted item when opened. Use when you don't need to control the highlighted value of the listbox.
                      Type
                      string[]
                      Description
                      The initial default value of the listbox when rendered. Use when you don't need to control the value of the listbox.
                      Type
                      boolean
                      Description
                      Whether to disallow empty selection
                      Type
                      'ltr' | 'rtl'
                      Description
                      The document's text/writing direction.
                      Type
                      boolean
                      Description
                      Whether the listbox is disabled
                      Type
                      boolean
                      Description
                      Whether to disallow selecting all items when meta+a is pressed
                      Type
                      () =>
                      | Node
                      | ShadowRoot
                      | Document
                      Description
                      A root node to correctly resolve document in custom environments. i.e., Iframes, Electron.
                          Type
                          string
                          Description
                          The controlled key of the highlighted item
                          Type
                          string
                          Description
                          id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                          Type
                          boolean
                          Description
                          Whether to loop the keyboard navigation through the options
                          Type
                          (details: {
                          highlightedIndex: number
                          highlightedItem: T
                          highlightedValue: string
                          }) => void
                          Description
                          The callback fired when the highlighted item changes.
                              Type
                              (details: {
                              value: string
                              }) => void
                              Description
                              Function called when an item is selected
                                  Type
                                  (details: {
                                  items: Array<T>
                                  value: string[]
                                  }) => void
                                  Description
                                  The callback fired when the selected item changes.
                                      Type
                                      | 'horizontal'
                                      | 'vertical'
                                      Description
                                      The orientation of the listbox.
                                      Type
                                      | ReactElement
                                      | ((
                                      props: object,
                                      ) => ReactElement)
                                      Description
                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                      Type
                                      (details: {
                                      getElement: () => HTMLElement
                                      immediate?: boolean
                                      index: number
                                      }) => void
                                      Description
                                      Function to scroll to a specific index
                                          Type
                                          | 'single'
                                          | 'multiple'
                                          | 'none'
                                          | 'extended'
                                          Description
                                          How multiple selection should behave in the listbox.

                                          -
                                          single: The user can select a single item.
                                          -
                                          multiple: The user can select multiple items without using modifier keys.
                                          -
                                          extended: The user can select multiple items by using modifier keys.
                                          Type
                                          boolean
                                          Description
                                          Whether to select the item when it is highlighted
                                          Type
                                          | 'sm'
                                          | 'md'
                                          | 'lg'
                                          Description
                                          Type
                                          boolean
                                          Description
                                          Whether to enable typeahead on the listbox
                                          Type
                                          string[]
                                          Description
                                          The controlled keys of the selected items

                                          <Listbox.Label>

                                          Accessible label for the listbox. 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

                                          <Listbox.Content>

                                          Container for the listbox 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

                                          <Listbox.Input>

                                          The Listbox.Input extends the TextInput component with listbox accessibility like keyboard navigation.

                                          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
                                          The simple TextInput doesn't support children.
                                          never
                                          When true, renders a clear button that resets the input value on click. The button only appears when the input has a value.
                                          boolean
                                          true
                                          
                                          {
                                          render?:
                                          | Element
                                          | ((
                                          props: Props,
                                          ) => Element)
                                          }
                                          The initial value of the input when rendered. Use when you don't need to control the value of the input.
                                          string
                                          The document's text/writing direction.
                                          'ltr' | 'rtl'
                                          'ltr'
                                          
                                          Whether the input is disabled. When true, prevents user interaction and applies visual styling to indicate the disabled state.
                                          boolean
                                          lucide-react icon, positioned after the input. Can be supplied as a ReactElement for additional customization.
                                          | LucideIcon
                                          | ReactNode
                                          Props applied to the error indicator element.
                                          {
                                          icon?:
                                          | LucideIcon
                                          | ReactNode
                                          render?:
                                          | Element
                                          | ((
                                          props: Props,
                                          ) => Element)
                                          }
                                          Optional error that describes the element when invalid is true.
                                          string
                                          Props applied to the error text element.
                                          {
                                          icon?:
                                          | LucideIcon
                                          | ReactNode
                                          render?:
                                          | Element
                                          | ((
                                          props: Props,
                                          ) => Element)
                                          }
                                          The id of the form that the input belongs to.
                                          string
                                          A root node to correctly resolve document in custom environments. i.e., Iframes, Electron.
                                            () =>
                                            | Node
                                            | ShadowRoot
                                            | Document
                                            Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
                                            Props applied to the label element.
                                            {
                                            children?: ReactNode
                                            render?:
                                            | Element
                                            | ((
                                            props: Props,
                                            ) => Element)
                                            }
                                            The ids of the elements that are associated with the input. These will be automatically generated if omitted.
                                            {
                                            errorText: string
                                            hint: string
                                            input: string
                                            label: string
                                            }
                                            Props applied to the input group element.
                                            TextInputInputGroupProps
                                            Props applied to the input element.
                                            any
                                            Controls the visual error state of the input. When true, applies semantic error styling to indicate validation failure.
                                            boolean
                                            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.
                                            {
                                            children?: ReactNode
                                            render?:
                                            | Element
                                            | ((
                                            props: Props,
                                            ) => Element)
                                            }
                                            The name of the input field. Useful for form submission.
                                            string
                                            The callback invoked when the field is focused or blurred.
                                              (
                                              focused: boolean,
                                              ) => void
                                              The callback invoked when the value changes.
                                                (
                                                value: string,
                                                ) => void
                                                HTML placeholder attribute, passed to the underlying input element.
                                                string
                                                Whether the input is read-only. When true, prevents user interaction while keeping the input focusable and visible.
                                                boolean
                                                Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                | ReactElement
                                                | ((
                                                props: object,
                                                ) => ReactElement)
                                                Whether the input is required. When true, the input must have a value for form validation to pass.
                                                boolean
                                                The size of the input field and its elements. Governs properties like font size, item padding, and icon sizes.
                                                | 'sm'
                                                | 'md'
                                                | 'lg'
                                                'md'
                                                
                                                lucide-react icon, positioned before the input. Can be supplied as a ReactElement for additional customization.
                                                | LucideIcon
                                                | ReactNode
                                                The controlled value of the input
                                                string
                                                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.
                                                Type
                                                never
                                                Description
                                                The simple TextInput doesn't support children.
                                                Type
                                                boolean
                                                Description
                                                When true, renders a clear button that resets the input value on click. The button only appears when the input has a value.
                                                Type
                                                {
                                                render?:
                                                | Element
                                                | ((
                                                props: Props,
                                                ) => Element)
                                                }
                                                Type
                                                string
                                                Description
                                                The initial value of the input when rendered. Use when you don't need to control the value of the input.
                                                Type
                                                'ltr' | 'rtl'
                                                Description
                                                The document's text/writing direction.
                                                Type
                                                boolean
                                                Description
                                                Whether the input is disabled. When true, prevents user interaction and applies visual styling to indicate the disabled state.
                                                Type
                                                | LucideIcon
                                                | ReactNode
                                                Description
                                                lucide-react icon, positioned after the input. Can be supplied as a ReactElement for additional customization.
                                                Type
                                                {
                                                icon?:
                                                | LucideIcon
                                                | ReactNode
                                                render?:
                                                | Element
                                                | ((
                                                props: Props,
                                                ) => Element)
                                                }
                                                Description
                                                Props applied to the error indicator element.
                                                Type
                                                string
                                                Description
                                                Optional error that describes the element when invalid is true.
                                                Type
                                                {
                                                icon?:
                                                | LucideIcon
                                                | ReactNode
                                                render?:
                                                | Element
                                                | ((
                                                props: Props,
                                                ) => Element)
                                                }
                                                Description
                                                Props applied to the error text element.
                                                Type
                                                string
                                                Description
                                                The id of the form that the input belongs to.
                                                Type
                                                () =>
                                                | Node
                                                | ShadowRoot
                                                | Document
                                                Description
                                                A root node to correctly resolve document in custom environments. i.e., Iframes, Electron.
                                                  Description
                                                  Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
                                                  Type
                                                  {
                                                  children?: ReactNode
                                                  render?:
                                                  | Element
                                                  | ((
                                                  props: Props,
                                                  ) => Element)
                                                  }
                                                  Description
                                                  Props applied to the label element.
                                                  Type
                                                  {
                                                  errorText: string
                                                  hint: string
                                                  input: string
                                                  label: string
                                                  }
                                                  Description
                                                  The ids of the elements that are associated with the input. These will be automatically generated if omitted.
                                                  Type
                                                  TextInputInputGroupProps
                                                  Description
                                                  Props applied to the input group element.
                                                  Type
                                                  any
                                                  Description
                                                  Props applied to the input element.
                                                  Type
                                                  boolean
                                                  Description
                                                  Controls the visual error state of the input. When true, applies semantic error styling to indicate validation failure.
                                                  Description
                                                  Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.
                                                  Type
                                                  {
                                                  children?: ReactNode
                                                  render?:
                                                  | Element
                                                  | ((
                                                  props: Props,
                                                  ) => Element)
                                                  }
                                                  Description
                                                  Props applied to the label element.
                                                  Type
                                                  string
                                                  Description
                                                  The name of the input field. Useful for form submission.
                                                  Type
                                                  (
                                                  focused: boolean,
                                                  ) => void
                                                  Description
                                                  The callback invoked when the field is focused or blurred.
                                                    Type
                                                    (
                                                    value: string,
                                                    ) => void
                                                    Description
                                                    The callback invoked when the value changes.
                                                      Type
                                                      string
                                                      Description
                                                      HTML placeholder attribute, passed to the underlying input element.
                                                      Type
                                                      boolean
                                                      Description
                                                      Whether the input is read-only. When true, prevents user interaction while keeping the input focusable and visible.
                                                      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 input is required. When true, the input must have a value for form validation to pass.
                                                      Type
                                                      | 'sm'
                                                      | 'md'
                                                      | 'lg'
                                                      Description
                                                      The size of the input field and its elements. Governs properties like font size, item padding, and icon sizes.
                                                      Type
                                                      | LucideIcon
                                                      | ReactNode
                                                      Description
                                                      lucide-react icon, positioned before the input. Can be supplied as a ReactElement for additional customization.
                                                      Type
                                                      string
                                                      Description
                                                      The controlled value of the input

                                                      <Listbox.Item>

                                                      An interactive option in the listbox. Renders a <li> element by default.
                                                      PropType
                                                      The item to render
                                                      T
                                                      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
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Listbox.ItemStartIcon>

                                                      An icon displayed before the text of a list item. Renders a <span> element by default when the icon is a React element.
                                                      PropType
                                                      The icon displayed before the item's text.
                                                      | LucideIcon
                                                      | ReactNode
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Type
                                                      | LucideIcon
                                                      | ReactNode
                                                      Description
                                                      The icon displayed before the item's text.
                                                      Type
                                                      | ReactElement
                                                      | ((
                                                      props: object,
                                                      ) => ReactElement)
                                                      Description
                                                      Allows you to replace the component's HTML element with a different tag or component. Learn more

                                                      <Listbox.ItemControl>

                                                      A selection indicator for a listbox item. 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

                                                      <Listbox.ItemLabel>

                                                      The primary text of a listbox option. 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

                                                      <Listbox.ItemDescription>

                                                      Supplementary text for a list item. 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

                                                      <Listbox.ItemSecondaryText>

                                                      Secondary text displayed after a list item's label and description. 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

                                                      <Listbox.ItemAccessory>

                                                      Content displayed at the end of a list item. 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

                                                      Data Structures

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

                                                      interface ExampleItem {
                                                        label: string
                                                        value: string
                                                      }
                                                      
                                                      const items: ExampleItem[] = [
                                                        // ...
                                                      ]
                                                      
                                                      function Component() {
                                                        const {fuzzyContains} = useFilter({sensitivity: "base"})
                                                        const {collection, filter} = useListCollection({
                                                          filter: fuzzyContains,
                                                          initialItems: items,
                                                          // the itemLabel is what the filter will use to compare items
                                                          itemLabel: (item) => item.label,
                                                          itemValue: (item) => item.value,
                                                        })
                                                        return <Listbox.Root collection={collection}>{/*...*/}</Listbox.Root>
                                                      }

                                                      useListCollection

                                                      PropType
                                                      The filter function to use to filter the items.
                                                          (
                                                          itemText: string,
                                                          filterText: string,
                                                          item: T,
                                                          ) => boolean
                                                          Function to group items
                                                              (
                                                              item: T,
                                                              index: number,
                                                              ) => string
                                                              Function to sort items
                                                              | string[]
                                                              | 'desc'
                                                              | 'asc'
                                                              | ((
                                                              a: string,
                                                              b: string,
                                                              ) => number)
                                                              The initial items to display in the collection (this is the initial state of the collection before filtering)
                                                              Array<T>
                                                              Function to determine if a node is disabled.
                                                                  (
                                                                  item: T,
                                                                  ) => boolean
                                                                  Function to get the item's label. This is the string used for filtering.
                                                                      (
                                                                      item: T,
                                                                      ) => string
                                                                      Function to get the item's unique value.
                                                                          (
                                                                          item: T,
                                                                          ) => string
                                                                          The maximum number of items to display in the collection. Useful for performance when you have a large number of items.
                                                                          number
                                                                          Type
                                                                          (
                                                                          itemText: string,
                                                                          filterText: string,
                                                                          item: T,
                                                                          ) => boolean
                                                                          Description
                                                                          The filter function to use to filter the items.
                                                                              Type
                                                                              (
                                                                              item: T,
                                                                              index: number,
                                                                              ) => string
                                                                              Description
                                                                              Function to group items
                                                                                  Type
                                                                                  | string[]
                                                                                  | 'desc'
                                                                                  | 'asc'
                                                                                  | ((
                                                                                  a: string,
                                                                                  b: string,
                                                                                  ) => number)
                                                                                  Description
                                                                                  Function to sort items
                                                                                  Type
                                                                                  Array<T>
                                                                                  Description
                                                                                  The initial items to display in the collection (this is the initial state of the collection before filtering)
                                                                                  Type
                                                                                  (
                                                                                  item: T,
                                                                                  ) => boolean
                                                                                  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
                                                                                          (
                                                                                          item: T,
                                                                                          ) => string
                                                                                          Description
                                                                                          Function to get the item's unique value.
                                                                                              Type
                                                                                              number
                                                                                              Description
                                                                                              The maximum number of items to display in the collection. Useful for performance when you have a large number of items.

                                                                                              Filter Options

                                                                                              The following predefined filters are available:

                                                                                              PropType
                                                                                              Checks if string contains substring using locale-aware exact matching
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Checks if string ends with substring using locale-aware exact matching
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Checks if string starts with substring or contains substring within Levenshtein distance threshold
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Checks if string starts with substring using locale-aware exact matching
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Type
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Checks if string contains substring using locale-aware exact matching
                                                                                              Type
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Checks if string ends with substring using locale-aware exact matching
                                                                                              Type
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Checks if string starts with substring or contains substring within Levenshtein distance threshold
                                                                                              Type
                                                                                              (
                                                                                              string: string,
                                                                                              substring: string,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Checks if string starts with substring using locale-aware exact matching

                                                                                              ListCollection

                                                                                              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
                                                                                              Compare two values
                                                                                              (
                                                                                              a: string,
                                                                                              b: string,
                                                                                              ) => -1 | 0 | 1
                                                                                              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,
                                                                                              ) => T
                                                                                              Get the items based on its values
                                                                                              (
                                                                                              values: string[],
                                                                                              ) => Array<T>
                                                                                              Returns the first value in the collection
                                                                                              string
                                                                                              Whether an item is disabled
                                                                                              (
                                                                                              T,
                                                                                              ) => boolean
                                                                                              Convert an item to a value
                                                                                              (
                                                                                              T,
                                                                                              ) => string
                                                                                              Returns the next value in the collection
                                                                                              (
                                                                                              value: string,
                                                                                              step: number,
                                                                                              clamp: boolean,
                                                                                              ) => string
                                                                                              Returns the previous value in the collection
                                                                                              (
                                                                                              value: string,
                                                                                              step: number,
                                                                                              clamp: boolean,
                                                                                              ) => string
                                                                                              Get the range of values between two values
                                                                                              (
                                                                                              from: string,
                                                                                              to: string,
                                                                                              ) => 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,
                                                                                              ) => boolean
                                                                                              Whether the collection has an item
                                                                                              (
                                                                                              T,
                                                                                              ) => boolean
                                                                                              Get the index of an item based on its key
                                                                                              (
                                                                                              value: string,
                                                                                              ) => 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
                                                                                              (
                                                                                              any,
                                                                                              ) => boolean
                                                                                              The items in the collection
                                                                                              Array<T>
                                                                                              Returns the last value in the collection
                                                                                              string
                                                                                              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,
                                                                                              {
                                                                                              currentValue: string
                                                                                              state: {
                                                                                              keysSoFar: string
                                                                                              timer: number
                                                                                              }
                                                                                              timeout?: number
                                                                                              },
                                                                                              ) => string
                                                                                              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,
                                                                                              ) => string
                                                                                              Convert an item to a string
                                                                                              (
                                                                                              T,
                                                                                              ) => string
                                                                                              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
                                                                                              last: string
                                                                                              size: number
                                                                                              }
                                                                                              Convert the collection to a string
                                                                                              () => string
                                                                                              Update an item in the collection
                                                                                              (
                                                                                              value: string,
                                                                                              T,
                                                                                              ) => ListCollection<T>
                                                                                              Update an item in the collection if it exists, otherwise append it
                                                                                              (
                                                                                              value: string,
                                                                                              T,
                                                                                              mode: 'append' | 'prepend',
                                                                                              ) => ListCollection<T>
                                                                                              Type
                                                                                              (
                                                                                              items: Array<T>,
                                                                                              ) => ListCollection<T>
                                                                                              Description
                                                                                              Append items to the collection
                                                                                              Type
                                                                                              (
                                                                                              index: number,
                                                                                              ) => T
                                                                                              Description
                                                                                              Get the item based on its index
                                                                                              Type
                                                                                              (
                                                                                              a: string,
                                                                                              b: string,
                                                                                              ) => -1 | 0 | 1
                                                                                              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,
                                                                                              ) => T
                                                                                              Description
                                                                                              Get the item based on its value
                                                                                              Type
                                                                                              (
                                                                                              values: string[],
                                                                                              ) => Array<T>
                                                                                              Description
                                                                                              Get the items based on its values
                                                                                              Type
                                                                                              string
                                                                                              Description
                                                                                              Returns the first value in the collection
                                                                                              Type
                                                                                              (
                                                                                              T,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Whether an item is disabled
                                                                                              Type
                                                                                              (
                                                                                              T,
                                                                                              ) => string
                                                                                              Description
                                                                                              Convert an item to a value
                                                                                              Type
                                                                                              (
                                                                                              value: string,
                                                                                              step: number,
                                                                                              clamp: boolean,
                                                                                              ) => string
                                                                                              Description
                                                                                              Returns the next value in the collection
                                                                                              Type
                                                                                              (
                                                                                              value: string,
                                                                                              step: number,
                                                                                              clamp: boolean,
                                                                                              ) => string
                                                                                              Description
                                                                                              Returns the previous value in the collection
                                                                                              Type
                                                                                              (
                                                                                              from: string,
                                                                                              to: string,
                                                                                              ) => 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,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Whether the collection has a value
                                                                                              Type
                                                                                              (
                                                                                              T,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Whether the collection has an item
                                                                                              Type
                                                                                              (
                                                                                              value: string,
                                                                                              ) => 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
                                                                                              (
                                                                                              any,
                                                                                              ) => boolean
                                                                                              Description
                                                                                              Check if the collection is equal to another collection
                                                                                              Type
                                                                                              Array<T>
                                                                                              Description
                                                                                              The items in the collection
                                                                                              Type
                                                                                              string
                                                                                              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,
                                                                                              {
                                                                                              currentValue: string
                                                                                              state: {
                                                                                              keysSoFar: string
                                                                                              timer: number
                                                                                              }
                                                                                              timeout?: number
                                                                                              },
                                                                                              ) => string
                                                                                              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,
                                                                                              ) => string
                                                                                              Description
                                                                                              Convert a value to a string
                                                                                              Type
                                                                                              (
                                                                                              T,
                                                                                              ) => string
                                                                                              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
                                                                                              last: string
                                                                                              size: number
                                                                                              }
                                                                                              Description
                                                                                              Convert the collection to a JSON object
                                                                                              Type
                                                                                              () => string
                                                                                              Description
                                                                                              Convert the collection to a string
                                                                                              Type
                                                                                              (
                                                                                              value: string,
                                                                                              T,
                                                                                              ) => ListCollection<T>
                                                                                              Description
                                                                                              Update an item in the collection
                                                                                              Type
                                                                                              (
                                                                                              value: string,
                                                                                              T,
                                                                                              mode: 'append' | 'prepend',
                                                                                              ) => ListCollection<T>
                                                                                              Description
                                                                                              Update an item in the collection if it exists, otherwise append it
                                                                                              Last updated on by Ryan Bower