Select

The select component provides a streamlined way for users to pick a single option from a collapsible list of choices. It conserves screen space while offering clear visual feedback and maintaining accessibility standards.

import {SelectModule} from "@qualcomm-ui/angular/select"

Overview

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

Examples

Simple

The simple API provides a standalone component with built-in layout.

City
<q-select
  class="w-48"
  label="City"
  placeholder="Select a city"
  [collection]="cityCollection"
/>

Composite

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

City
<div
  class="w-48"
  placeholder="Select a city"
  q-select-root
  [collection]="cityCollection"
>
  <div q-select-label>City</div>

  <div q-select-control>
    <span q-select-value-text></span>
    <button q-select-clear-trigger></button>
    <button q-select-indicator></button>
    <div q-select-error-indicator></div>
  </div>

  <select q-select-hidden-select></select>

  <ng-template qPortal>
    <div q-select-positioner>
      <div q-select-content>
        @for (item of cityCollection.items; track item) {
          <div q-select-item [item]="item">
            <span q-select-item-text>
              {{ cityCollection.stringifyItem(item) }}
            </span>
            <span q-select-item-indicator></span>
          </div>
        }
      </div>
    </div>
  </ng-template>
</div>

ARIA Label

The Select's label is automatically associated with the control for accessibility. If you omit the label, give the control an accessible name with aria-label or aria-labelledby.

<q-select
  aria-label="City"
  class="w-48"
  placeholder="Select a city"
  [collection]="cityCollection"
/>

Use aria-label or aria-labelledby on the simple <q-select> to forward an accessible name to the internal control. The q-select host removes those attributes after forwarding them. If you use the composite API, provide aria-label or aria-labelledby on the q-select-control element. For dynamic label references, use [aria-labelledby] instead of [attr.aria-labelledby] so the control can treat the value as a consumer-provided override.

Content Width

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

City
<q-select
  class="w-48"
  label="City"
  placeholder="Select a city"
  [collection]="cityCollection"
  [positioning]="{sameWidth: false}"
/>

Trigger Icon

Use the icon prop to add an icon to the start of the trigger element. View our Icon documentation to learn more about using icons in QUI.

City
<q-select
  class="w-48"
  icon="MapPin"
  label="City"
  placeholder="Select a city"
  [collection]="cityCollection"
/>

Items as Objects

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

City
cityCollection = selectCollection({
  itemLabel: (item) => item.name,
  items: [
    {name: "San Diego", value: "SD"},
    {name: "Nashville", value: "NV"},
    {name: "Denver", value: "DV"},
    {name: "Miami", value: "MI"},
    {name: "Las Vegas", value: "LV"},
    {name: "New York City", value: "NYC"},
    {name: "San Francisco", value: "SF"},
  ],
  itemValue: (item) => item.value,
})

Item Groups

Use the ListCollection's groupBy and groupSort properties to group items into categories. Render each category with q-select-item-group and q-select-item-group-label by iterating over the collection's group() method.

<div
  class="w-80"
  name="chip-software-product"
  placeholder="Select a product"
  q-select-root
  [collection]="collection"
>
  <label q-select-label>Chip software product</label>
  <div q-select-control>
    <span q-select-value-text></span>
    <button q-select-clear-trigger></button>
    <button q-select-indicator></button>
  </div>
  <select q-select-hidden-select></select>
  <ng-template qPortal>
    <div q-select-positioner>
      <div q-select-content>
        @for (group of collection.group(); track group[0]) {
          <div q-select-item-group>
            <div q-select-item-group-label>{{ group[0] }}</div>
            @for (product of group[1]; track product.softwareId) {
              <div q-select-item [item]="product">
                <span q-select-item-text>{{ product.name }}</span>
                <span q-select-item-indicator></span>
              </div>
            }
          </div>
        }
      </div>
    </div>
  </ng-template>
</div>

Sizes

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

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

<q-select
  aria-label="City"
  class="w-40"
  placeholder="sm"
  size="sm"
  [collection]="cityCollection"
/>
<q-select
  aria-label="City"
  class="w-48"
  placeholder="md"
  size="md"
  [collection]="cityCollection"
/>
<q-select
  aria-label="City"
  class="w-56"
  placeholder="lg"
  size="lg"
  [collection]="cityCollection"
/>

Content Height

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

City
<q-select
  class="w-48"
  label="City"
  placeholder="Select a city"
  [collection]="cityCollection"
>
  <div q-select-content style="max-height: 240px">
    <q-select-items />
  </div>
</q-select>

Multiple Selection

Use the multiple prop to allow multiple selections.

The selectionIndicator prop controls how selected items are displayed:

  • "checkmark" — Uses a checkmark after the selected options only (default)
  • "checkbox" — Uses a checkbox before each option
City
<q-select
  class="w-72"
  label="City"
  multiple
  placeholder="Select cities"
  selectionIndicator="checkbox"
  [collection]="cityCollection"
/>

Controlled Dropdown Visibility

Set the initial visibility using the defaultOpen prop, or use open and openChanged to control the dropdown visibility manually. These props follow our controlled state pattern.

City
<q-select
  class="w-48"
  label="City"
  placeholder="Select a city"
  [collection]="cityCollection"
  [open]="isOpen()"
  (openChanged)="isOpen.set($event)"
/>

Error Text and Indicator

Error messages are displayed using two props:

  • invalid
  • errorText (or the q-select-error-text component when using the composite API)

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

City
Invalid
<q-select
  class="w-48"
  errorText="Invalid"
  invalid
  label="City"
  [collection]="cityCollection"
/>

Item Customization

When using the simple API, provide the q-select-content directive as a child of the <q-select> component to override the default item renderer. The following example demonstrates how to add a custom icon to each item:

Food
<q-select
  class="w-48"
  label="Food"
  [collection]="cityCollection"
  [icon]="valueIcon()"
  (valueChanged)="value.set($event.items)"
>
  <div q-select-content>
    @for (
      item of cityCollection.items;
      track cityCollection.getItemValue(item)
    ) {
      <div q-select-item [item]="item">
        <svg [qIcon]="item.icon"></svg>
        <span q-select-item-text>
          {{ cityCollection.stringifyItem(item) }}
        </span>
        <span q-select-item-indicator></span>
      </div>
    }
  </div>
</q-select>

Within Dialog

To use the Select within a Dialog, you need to avoid portalling the item dropdown. To do this using the simple API, set disablePortal property to true:

<q-select
  aria-label="City"
  class="w-48"
  disablePortal
  placeholder="Select a city"
  [collection]="cityCollection"
/>

Within Popover

Like with the Dialog, you need to avoid portalling the q-select-positioner:

<div q-popover>
  <div q-popover-anchor>
    <button q-button q-popover-trigger variant="outline">Click Me</button>
  </div>
  <q-select
    disablePortal
    label="City"
    placeholder="Select a city"
    [collection]="cityCollection"
  />
</div>

Forms

  • All form control values are arrays to support multiple selections.
  • The value of the form control is an array of type T, where T is the type of the items in your select collection.

Template Forms

Strings

[ "San Diego" ]
City
readonly value = signal<string[]>(["San Diego"])

Objects

[ { "id": "SD", "name": "San Diego" } ]
City
readonly value = signal<City[]>([{id: "SD", name: "San Diego"}])

States

When using template forms, the disabled, readOnly, and invalid properties govern the interactive state of the control.

Disabled
Read only
Invalid
Invalid
<q-select
  disabled
  label="Disabled"
  placeholder="Disabled"
  [collection]="cityCollection"
/>
<q-select
  label="Read only"
  placeholder="Read only"
  readOnly
  [collection]="cityCollection"
/>
<q-select
  errorText="Invalid"
  invalid
  label="Invalid"
  placeholder="Invalid"
  [collection]="cityCollection"
/>

Required

When using template forms, pass the required property to the form control. This applies the RequiredValidator and MinLengthValidator to the form control.

City
<q-select
  class="w-48"
  errorText="Please select a city"
  label="City"
  placeholder="Select a city"
  required
  [collection]="cityCollection"
  [(ngModel)]="value"
/>

Reactive Forms

Strings

[ "San Diego" ]
City
readonly formControl = new FormControl<string[]>(["San Diego"])

Objects

[ { "id": "SD", "name": "San Diego" } ]
City
readonly formControl = new FormControl<City[]>([
  {id: "SD", name: "San Diego"},
])

State Guidelines

The disabled, invalid, and required properties have no effect when using Reactive Forms. Use the equivalent Reactive Form bindings instead:

Disabled
Required
Invalid
disabledField = new FormControl([])
invalidField = new FormControl([], {
  validators: [Validators.required, Validators.minLength(1)],
})
requiredField = new FormControl([], {
  validators: [Validators.required, Validators.minLength(1)],
})

ngOnInit() {
  this.disabledField.disable()
  this.invalidField.markAsDirty()
}

Explorer

API

<q-select>

The simple select extends the q-select-root directive with the following properties:

PropTypeDefault
ARIA label applied to the control element. Use this if you omit the label
string
ID reference for an external label applied to the control element.
string
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
Set to true to disable portalling behavior for the select dropdown content.
boolean
Optional error that describes the element when invalid is true.
string | null
Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
string | null
Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.
string
Type
string
Description
ARIA label applied to the control element. Use this if you omit the label
Type
string
Description
ID reference for an external label applied to the control element.
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
boolean
Description
Set to true to disable portalling behavior for the select dropdown content.
Type
string | null
Description
Optional error that describes the element when invalid is true.
Type
string | null
Description
Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
Type
string
Description
Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.

Composite API

q-select-root

PropTypeDefault
The item collection
Whether the select should close after an item is selected
boolean
true
The initial value of the highlighted item when opened. Use when you don't need to control the highlighted value of the select.
string | null
Whether the select's open state is controlled by the user
boolean
The initial value of the input when rendered. Use when you don't need to control the value of the input. This property will be ignored if you opt into controlled state via form control bindings.
Array<T>
Whether the value can be cleared by clicking the selected item.

This is only applicable for single selection.
boolean
The document's text/writing direction.
'ltr' | 'rtl'
"ltr"
Controls whether the input is disabled in template-driven forms. When true, prevents user interaction and applies visual styling to indicate the disabled state.
boolean
A root node to correctly resolve the Document in custom environments. i.e., Iframes, Electron.
() =>
| ShadowRoot
| Document
| Node
The controlled key of the highlighted item
string | null
lucide icon, positioned at the start of the trigger element.
| LucideIcon
| LucideIconData
| string
id attribute. If omitted, a unique identifier will be generated for accessibility.)
string
Controls the visual error state of the input. When true, applies semantic error styling to indicate validation failure.
boolean
Whether to loop the keyboard navigation through the options
boolean
false
Whether to allow multiple selection
boolean
false
The name of the input field. Useful for form submission.
string
Whether the select menu is open
boolean
Placeholder text to display when no value is selected.
string
"Select option"
The positioning options of the menu.
Whether the input is read-only. When true, prevents user interaction while keeping the input focusable and visible.
boolean
Controls whether the input is required in template-driven forms. When true, the input must have a value for form validation to pass.
boolean
Function to scroll to a specific index
(details: {
immediate?:
| boolean
| undefined
index: number
}) => void
Visual indicator style for selected items. Use "checkbox" for multi-select with always-visible checkboxes on the left, or "checkmark" for a checkmark icon on the right that only appears when selected.
| 'checkmark'
| 'checkbox'
'checkmark'
The size of the select and its elements. Governs properties like font size, item padding, and icon sizes.
| 'sm'
| 'md'
| 'lg'
'md'
Function called when the focus is moved outside the component
FocusOutsideEvent
The callback fired when the highlighted item changes.
{
value: string | null
} & {
highlightedIndex: number
highlightedItem: T | null
}
Function called when an interaction happens outside the component
| PointerDownOutsideEvent
| FocusOutsideEvent
Function invoked when the popup opens or closes
boolean
Function called when the pointer is pressed down outside the component
PointerDownOutsideEvent
Function called when an item is selected
{
value: string | undefined
}
The callback fired when the selected item changes.
{
value: string[]
items: Array<T>
}
Description
The item collection
Type
boolean
Description
Whether the select should close after an item is selected
Type
string | null
Description
The initial value of the highlighted item when opened. Use when you don't need to control the highlighted value of the select.
Type
boolean
Description
Whether the select's open state is controlled by the user
Type
Array<T>
Description
The initial value of the input when rendered. Use when you don't need to control the value of the input. This property will be ignored if you opt into controlled state via form control bindings.
Type
boolean
Description
Whether the value can be cleared by clicking the selected item.

This is only applicable for single selection.
Type
'ltr' | 'rtl'
Description
The document's text/writing direction.
Type
boolean
Description
Controls whether the input is disabled in template-driven forms. When true, prevents user interaction and applies visual styling to indicate the disabled state.
Type
() =>
| ShadowRoot
| Document
| Node
Description
A root node to correctly resolve the Document in custom environments. i.e., Iframes, Electron.
Type
string | null
Description
The controlled key of the highlighted item
Type
| LucideIcon
| LucideIconData
| string
Description
lucide icon, positioned at the start of the trigger element.
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.)
Type
boolean
Description
Controls the visual error state of the input. When true, applies semantic error styling to indicate validation failure.
Type
boolean
Description
Whether to loop the keyboard navigation through the options
Type
boolean
Description
Whether to allow multiple selection
Type
string
Description
The name of the input field. Useful for form submission.
Type
boolean
Description
Whether the select menu is open
Type
string
Description
Placeholder text to display when no value is selected.
Description
The positioning options of the menu.
Type
boolean
Description
Whether the input is read-only. When true, prevents user interaction while keeping the input focusable and visible.
Type
boolean
Description
Controls whether the input is required in template-driven forms. When true, the input must have a value for form validation to pass.
Type
(details: {
immediate?:
| boolean
| undefined
index: number
}) => void
Description
Function to scroll to a specific index
Type
| 'checkmark'
| 'checkbox'
Description
Visual indicator style for selected items. Use "checkbox" for multi-select with always-visible checkboxes on the left, or "checkmark" for a checkmark icon on the right that only appears when selected.
Type
| 'sm'
| 'md'
| 'lg'
Description
The size of the select and its elements. Governs properties like font size, item padding, and icon sizes.
Type
FocusOutsideEvent
Description
Function called when the focus is moved outside the component
Type
{
value: string | null
} & {
highlightedIndex: number
highlightedItem: T | null
}
Description
The callback fired when the highlighted item changes.
Type
| PointerDownOutsideEvent
| FocusOutsideEvent
Description
Function called when an interaction happens outside the component
Type
boolean
Description
Function invoked when the popup opens or closes
Type
PointerDownOutsideEvent
Description
Function called when the pointer is pressed down outside the component
Type
{
value: string | undefined
}
Description
Function called when an item is selected
Type
{
value: string[]
items: Array<T>
}
Description
The callback fired when the selected item changes.

q-select-label

PropType
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-control

PropType
ARIA label applied to the control. Use this instead of [attr.aria-label]
string
ID reference for an external label applied to the control.
string
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
ARIA label applied to the control. Use this instead of [attr.aria-label]
Type
string
Description
ID reference for an external label applied to the control.
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-indicator

PropTypeDefault
Indicator icon.
| LucideIcon
| LucideIconData
| string
LucideChevronDown
Type
| LucideIcon
| LucideIconData
| string
Description
Indicator icon.

q-select-value-text

PropTypeDefault
Returns the accessible label for a selected item's remove button.
(
itemText: string,
) => string
(itemText) => `Remove ${itemText}`
Type
(
itemText: string,
) => string
Description
Returns the accessible label for a selected item's remove button.

q-select-clear-trigger

PropType
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-positioner

PropType
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-content

PropType
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-item

PropType
The item to render, from the collection
any
Whether hovering outside should clear the highlighted state
boolean
Type
any
Description
The item to render, from the collection
Type
boolean
Description
Whether hovering outside should clear the highlighted state

q-select-item-group

PropType
Unique identifier for the select item group. Not the final HTML id attribute.
string
Type
string
Description
Unique identifier for the select item group. Not the final HTML id attribute.

q-select-item-group-label

q-select-item-checkbox

Checkbox-style indicator for select items. Use this instead of q-select-item-indicator when selectionIndicator="checkbox" is set on the root. The checkbox is always visible and fills when the item is selected.

Checkbox-style indicator for select items. Always visible, showing a checkbox that fills when selected. Use with selectionIndicator="checkbox" on the Select root.

q-select-item-indicator

q-select-item-text

q-select-hidden-select

PropType
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-hint

PropType
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-error-text

PropType
Optional error indicator icon.
| LucideIcon
| LucideIconData
| string
id attribute. If omitted, a unique identifier will be generated for accessibility.
string
Type
| LucideIcon
| LucideIconData
| string
Description
Optional error indicator icon.
Type
string
Description
id attribute. If omitted, a unique identifier will be generated for accessibility.

q-select-error-indicator

PropTypeDefault
@lucide/angular icon
| LucideIcon
| LucideIconData
| string
LucideCircleAlert
Type
| LucideIcon
| LucideIconData
| string
Description
@lucide/angular icon

Data Structures

ListCollection

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

@Component({
  template: `
    <q-select [collection]="collection" />
  `,
})
export class MyComponent {
  collection = selectCollection({
    items: [
      // ...
    ],
  })
}

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

Constructor

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

                  SelectPositioningOptions

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