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 {Select} from "@qualcomm-ui/react/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.

<Select
  className="w-48"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  placeholder="Select a city"
/>

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.

<Select.Root
  className="w-48"
  collection={cityCollection}
  placeholder="Select a city"
>
  <Select.Label>City</Select.Label>

  <Select.Control>
    <Select.ValueText />
    <Select.ClearTrigger />
    <Select.Indicator />
    <Select.ErrorIndicator />
  </Select.Control>

  <Select.HiddenSelect />

  <Portal>
    <Select.Positioner>
      <Select.Content>
        {cityCollection.items.map((item) => {
          const label = cityCollection.stringifyItem(item)
          const value = cityCollection.getItemValue(item)
          return (
            <Select.Item key={value} item={item}>
              <Select.ItemText>{label}</Select.ItemText>
              <Select.ItemIndicator />
            </Select.Item>
          )
        })}
      </Select.Content>
    </Select.Positioner>
  </Portal>
</Select.Root>

ARIA Label

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

<Select
  className="w-48"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  placeholder="Select a city"
/>

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.

<Select
  className="w-48"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  placeholder="Select a city"
  positioning={{sameWidth: false}}
/>

Trigger Icon

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

<Select
  className="w-48"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  icon={MapPin}
  placeholder="Select a city"
/>

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.

const 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,
})

Sizes

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

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

import type {ReactElement} from "react"

import {selectCollection} from "@qualcomm-ui/core/select"
import {Select} from "@qualcomm-ui/react/select"

const cityCollection = selectCollection({
  items: ["San Diego", "Dallas", "Denver"],
})

export function SelectSizesDemo(): ReactElement {
  return (
    <div className="flex flex-col items-center gap-4">
      <Select
        className="w-40"
        collection={cityCollection}
        controlProps={{"aria-label": "City"}}
        placeholder="sm"
        positioning={{sameWidth: true}}
        size="sm"
      />
      <Select
        className="w-48"
        collection={cityCollection}
        controlProps={{"aria-label": "City"}}
        placeholder="md"
        positioning={{sameWidth: true}}
        size="md"
      />
      <Select
        className="w-56"
        collection={cityCollection}
        controlProps={{"aria-label": "City"}}
        placeholder="lg"
        positioning={{sameWidth: true}}
        size="lg"
      />
    </div>
  )
}

Content Height

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

<Select
  className="w-48"
  collection={cityCollection}
  contentProps={{style: {maxHeight: 240}}}
  controlProps={{"aria-label": "City"}}
  placeholder="Select a city"
  positioning={{sameWidth: true}}
/>

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
<Select
  className="w-72"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  multiple
  placeholder="Select cities"
  selectionIndicator="checkbox"
/>

Controlled State

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

<Select
  className="w-48"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  onValueChange={setValue}
  placeholder="Select a city"
  value={value}
/>

States

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

Invalid
<Select
  className="w-48"
  collection={cityCollection}
  defaultValue={["San Diego"]}
  disabled
  label="Disabled"
/>
<Select
  className="w-48"
  collection={cityCollection}
  defaultValue={["San Diego"]}
  label="Read only"
  readOnly
/>
<Select
  className="w-48"
  collection={cityCollection}
  defaultValue={["San Diego"]}
  errorText="Invalid"
  invalid
  label="Invalid"
/>

Error Text and Indicator

Error messages are displayed using two props:

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

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

You must select a city
<Select
  className="w-48"
  collection={cityCollection}
  controlProps={{"aria-label": "City"}}
  errorText="You must select a city"
  invalid={!value.length}
  onValueChange={setValue}
  placeholder="Select a city"
  value={value}
/>

Within Dialog

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

import type {ReactElement} from "react"

import {selectCollection} from "@qualcomm-ui/core/select"
import {Button} from "@qualcomm-ui/react/button"
import {Dialog} from "@qualcomm-ui/react/dialog"
import {Select} from "@qualcomm-ui/react/select"

const cityCollection = selectCollection({
  items: [
    "San Diego",
    "Nashville",
    "Denver",
    "Miami",
    "Las Vegas",
    "New York City",
    "San Francisco",
  ],
})

export function SelectWithinDialogDemo(): ReactElement {
  return (
    <Dialog.Root>
      <Dialog.Trigger>
        <Button emphasis="primary" variant="fill">
          Open Dialog
        </Button>
      </Dialog.Trigger>
      <Dialog.FloatingPortal>
        <Dialog.Body>
          <Dialog.Heading>Dialog Title</Dialog.Heading>
          <Dialog.CloseButton />
          <Select
            className="w-48"
            collection={cityCollection}
            controlProps={{"aria-label": "City"}}
            placeholder="Select a city"
            portalProps={{disabled: true}}
          />
        </Dialog.Body>

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

Within Popover

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

import type {ReactElement} from "react"

import {selectCollection} from "@qualcomm-ui/core/select"
import {Button} from "@qualcomm-ui/react/button"
import {Popover} from "@qualcomm-ui/react/popover"
import {Select} from "@qualcomm-ui/react/select"

const cityCollection = selectCollection({
  items: [
    "San Diego",
    "Nashville",
    "Denver",
    "Miami",
    "Las Vegas",
    "New York City",
    "San Francisco",
  ],
})

export function SelectWithinPopoverDemo(): ReactElement {
  return (
    <Popover
      label="Select Example"
      trigger={<Button emphasis="primary">Show Popover</Button>}
    >
      <Select
        className="w-48"
        collection={cityCollection}
        label="City"
        placeholder="Select a city"
        portalProps={{disabled: true}}
      />
    </Popover>
  )
}

Forms

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

React Hook Form

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

import type {ReactElement} from "react"

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

import {selectCollection} from "@qualcomm-ui/core/select"
import {Button} from "@qualcomm-ui/react/button"
import {Select} from "@qualcomm-ui/react/select"
import {createToaster, Toaster} from "@qualcomm-ui/react/toast"

const cityCollection = selectCollection({
  items: [
    "San Diego",
    "Nashville",
    "Denver",
    "Miami",
    "Las Vegas",
    "New York City",
    "San Francisco",
  ],
})

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

type ValueSchema = typeof valueSchema.infer

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

export function SelectHookFormDemo(): ReactElement {
  const {
    control,
    formState: {isSubmitting},
    handleSubmit,
    setError,
  } = useForm<ValueSchema>({
    defaultValues: {
      city: [],
    },
  })

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

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

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

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

Tanstack Form

Tanstack Form handles validation with its built-in validators.

import type {ReactElement} from "react"

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

import {selectCollection} from "@qualcomm-ui/core/select"
import {Button} from "@qualcomm-ui/react/button"
import {Select} from "@qualcomm-ui/react/select"
import {createToaster, Toaster} from "@qualcomm-ui/react/toast"

const cityCollection = selectCollection({
  items: [
    "San Diego",
    "Nashville",
    "Denver",
    "Miami",
    "Las Vegas",
    "New York City",
    "San Francisco",
  ],
})

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

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

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

Tanstack form also supports ArkType.

Explorer

Select a city
Choose a location
San Diego
Nashville
Denver

API

<Select>

The simple select extends the Select.Root component with the following props:

PropTypeDefault
aria-label attribute, forwarded to the hidden select element.
string
aria-labelledby attribute, forwarded to the hidden select element. If you provide a label, omit this prop.
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
Props applied to the clear trigger element.
Props applied to the content element.
Props applied to the trigger element.
Props applied to the error indicator element.
Optional error that describes the element when invalid is true.
Props applied to the error text element.
Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
Props applied to the label element.
Props applied to the indicator element.
Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.
Props applied to the label element.
Props applied to the portal element.
PortalProps
Props applied to the positioner element.
Props applied to the select element.
Props applied to the value text element.
Type
string
Description
aria-label attribute, forwarded to the hidden select element.
Type
string
Description
aria-labelledby attribute, forwarded to the hidden select element. If you provide a label, omit this prop.
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.
Description
Props applied to the clear trigger element.
Description
Props applied to the content element.
Description
Props applied to the trigger element.
Description
Props applied to the error indicator element.
Description
Optional error that describes the element when invalid is true.
Description
Props applied to the error text element.
Description
Optional hint describing the element. This element is automatically associated with the component's input element for accessibility.
Description
Props applied to the label element.
Description
Props applied to the indicator element.
Description
Optional label describing the element. Recommended. This element is automatically associated with the component's input element for accessibility.
Description
Props applied to the label element.
Type
PortalProps
Description
Props applied to the portal element.
Description
Props applied to the positioner element.
Description
Props applied to the select element.
Description
Props applied to the value text element.

Composite API

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

<Select.Root>

Groups all parts of the select. Renders a <div> element by default.
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
Whether the select's open state is controlled by the user
boolean
The initial default value of the select when rendered. Use when you don't need to control the value of the select.
string[]
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'
Whether the select is disabled
boolean
The associate form of the underlying select.
string
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
    lucide icon, positioned at the start of the input field.
    | LucideIcon
    | ReactNode
    id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
    string
    The ids of the elements that are associated with the select. These will be automatically generated if omitted.
    Partial<
    Omit<
    {
    clearTrigger: string
    content: string
    control: string
    errorText: string
    hiddenSelect: string
    hint: string
    label: string
    positioner: string
    root: string
    },
    | 'item'
    | 'itemGroup'
    | 'itemGroupLabel'
    >
    >
    Whether to synchronize the present change immediately or defer it to the next frame
    boolean
    Whether the select is invalid
    boolean
    When true, the component will not be rendered in the DOM until it becomes visible or active.
    boolean
    false
    
    Whether to loop the keyboard navigation through the options
    boolean
    false
    
    Whether to allow multiple selection
    boolean
    false
    
    The name attribute of the underlying select.
    string
    Function called when the animation ends in the closed state
    VoidFunction
    Function called when the focus is moved outside the component
      (
      event: FocusOutsideEvent,
      ) => void
      The callback fired when the highlighted item changes.
        (
        value: string,
        details: {
        highlightedIndex: number
        highlightedItem: T
        },
        ) => void
        Function called when an interaction happens outside the component
          (
          event: InteractOutsideEvent,
          ) => void
          Function invoked when the popup opens or closes
          • open:The next value of the open state.
          (
          open: boolean,
          ) => void
          Function called when the pointer is pressed down outside the component
            (
            event: PointerDownOutsideEvent,
            ) => void
            Function called when an item is selected
              (
              value: string,
              ) => void
              The callback fired when the selected item changes.
                (
                valueStrings: string[],
                details: {items: Array<T>},
                ) => void
                Whether the select menu is open
                boolean
                Placeholder text to display when no value is selected.
                string
                "Select an option"
                
                The positioning options of the menu.
                Whether the node is present (controlled by the user)
                boolean
                Whether the select is read-only
                boolean
                Allows you to replace the component's HTML element with a different tag or component. Learn more
                | ReactElement
                | ((
                props: object,
                ) => ReactElement)
                Whether the select is required
                boolean
                Function to scroll to a specific index
                  (details: {
                  immediate?: boolean
                  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'
                  
                  Whether to allow the initial presence animation.
                  boolean
                  false
                  
                  When true, the component will be completely removed from the DOM when it becomes inactive or hidden, rather than just being hidden with CSS.
                  boolean
                  false
                  
                  The controlled keys of the selected items
                  string[]
                  Description
                  The item collection
                  Type
                  boolean
                  Description
                  Whether the select should close after an item is selected
                  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 select.
                  Type
                  boolean
                  Description
                  Whether the select's open state is controlled by the user
                  Type
                  string[]
                  Description
                  The initial default value of the select when rendered. Use when you don't need to control the value of the select.
                  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
                  Whether the select is disabled
                  Type
                  string
                  Description
                  The associate form of the underlying select.
                  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
                    | LucideIcon
                    | ReactNode
                    Description
                    lucide icon, positioned at the start of the input field.
                    Type
                    string
                    Description
                    id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                    Type
                    Partial<
                    Omit<
                    {
                    clearTrigger: string
                    content: string
                    control: string
                    errorText: string
                    hiddenSelect: string
                    hint: string
                    label: string
                    positioner: string
                    root: string
                    },
                    | 'item'
                    | 'itemGroup'
                    | 'itemGroupLabel'
                    >
                    >
                    Description
                    The ids of the elements that are associated with the select. These will be automatically generated if omitted.
                    Type
                    boolean
                    Description
                    Whether to synchronize the present change immediately or defer it to the next frame
                    Type
                    boolean
                    Description
                    Whether the select is invalid
                    Type
                    boolean
                    Description
                    When true, the component will not be rendered in the DOM until it becomes visible or active.
                    Type
                    boolean
                    Description
                    Whether to loop the keyboard navigation through the options
                    Type
                    boolean
                    Description
                    Whether to allow multiple selection
                    Type
                    string
                    Description
                    The name attribute of the underlying select.
                    Type
                    VoidFunction
                    Description
                    Function called when the animation ends in the closed state
                    Type
                    (
                    event: FocusOutsideEvent,
                    ) => void
                    Description
                    Function called when the focus is moved outside the component
                      Type
                      (
                      value: string,
                      details: {
                      highlightedIndex: number
                      highlightedItem: T
                      },
                      ) => void
                      Description
                      The callback fired when the highlighted item changes.
                        Type
                        (
                        event: InteractOutsideEvent,
                        ) => void
                        Description
                        Function called when an interaction happens outside the component
                          Type
                          (
                          open: boolean,
                          ) => void
                          Description
                          Function invoked when the popup opens or closes
                          • open:The next value of the open state.
                          Type
                          (
                          event: PointerDownOutsideEvent,
                          ) => void
                          Description
                          Function called when the pointer is pressed down outside the component
                            Type
                            (
                            value: string,
                            ) => void
                            Description
                            Function called when an item is selected
                              Type
                              (
                              valueStrings: string[],
                              details: {items: Array<T>},
                              ) => void
                              Description
                              The callback fired when the selected item changes.
                                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 node is present (controlled by the user)
                                Type
                                boolean
                                Description
                                Whether the select is read-only
                                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 select is required
                                Type
                                (details: {
                                immediate?: boolean
                                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
                                  boolean
                                  Description
                                  Whether to allow the initial presence animation.
                                  Type
                                  boolean
                                  Description
                                  When true, the component will be completely removed from the DOM when it becomes inactive or hidden, rather than just being hidden with CSS.
                                  Type
                                  string[]
                                  Description
                                  The controlled keys of the selected items

                                  <Select.Label>

                                  Label text associated with the select. Renders a <label> element by default.
                                  PropType
                                  React children prop.
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  string
                                  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
                                  string
                                  Description
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  Type
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Description
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more

                                  <Select.Control>

                                  The trigger that opens and closes the select menu. 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

                                  <Select.Indicator>

                                  Icon that indicates the open/close state of the select's associated panel. Renders a <button> element by default.
                                  PropTypeDefault
                                  Indicator icon.
                                  | ReactNode
                                  | LucideIcon
                                  ChevronDown
                                  
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Type
                                  | ReactNode
                                  | LucideIcon
                                  Description
                                  Indicator icon.
                                  Type
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Description
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more

                                  <Select.ValueText>

                                  Displays the currently selected value(s). 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

                                  <Select.ClearTrigger>

                                  Button that clears the selected value. Renders a <button> element by default.
                                  PropType
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  string
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Type
                                  string
                                  Description
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  Type
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Description
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more

                                  <Select.Positioner>

                                  Positions the select menu relative to the trigger. Renders a <div> element by default.
                                  PropType
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  string
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Type
                                  string
                                  Description
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  Type
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Description
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more

                                  <Select.Content>

                                  Container for the select options. 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

                                  <Select.Item>

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

                                  <Select.ItemCheckbox>

                                  Checkbox-style indicator for select items. Use this instead of Select.ItemIndicator 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.
                                  PropTypeDefault
                                  Whether the checkbox is disabled. When true, prevents user interaction and applies visual styling to indicate the disabled state.
                                  boolean
                                  If true and the checkmark is not checked, the checkmark will render as indeterminate to indicate partial selection.
                                  boolean
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Governs the size of the icon.
                                  | 'sm'
                                  | 'md'
                                  | 'lg'
                                  'md'
                                  
                                  Type
                                  boolean
                                  Description
                                  Whether the checkbox is disabled. When true, prevents user interaction and applies visual styling to indicate the disabled state.
                                  Type
                                  boolean
                                  Description
                                  If true and the checkmark is not checked, the checkmark will render as indeterminate to indicate partial selection.
                                  Type
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Description
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more
                                  Type
                                  | 'sm'
                                  | 'md'
                                  | 'lg'
                                  Description
                                  Governs the size of the icon.

                                  <Select.ItemIndicator>

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

                                  <Select.ItemText>

                                  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

                                  <Select.HiddenSelect>

                                  Hidden native select element for form submission. Renders a <select> element.

                                  <Select.Hint>

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

                                  <Select.ErrorText>

                                  Error message displayed when the input is invalid. Renders a <div> element by default.
                                  PropType
                                  An icon to display next to the error text.
                                  | LucideIcon
                                  | ReactNode
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  string
                                  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
                                  An icon to display next to the error text.
                                  Type
                                  string
                                  Description
                                  id attribute. If omitted, a unique identifier will be automatically generated for accessibility.
                                  Type
                                  | ReactElement
                                  | ((
                                  props: object,
                                  ) => ReactElement)
                                  Description
                                  Allows you to replace the component's HTML element with a different tag or component. Learn more

                                  <Select.ErrorIndicator>

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

                                  Data Structures

                                  ListCollection

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

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

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

                                  Constructor

                                  PropType
                                  Function to group items
                                      (
                                      item: T,
                                      index: number,
                                      ) => string
                                      Function to sort items
                                      | string[]
                                      | 'desc'
                                      | 'asc'
                                      | ((
                                      a: string,
                                      b: string,
                                      ) => number)
                                      Function to determine if a node is disabled.
                                          (
                                          item: T,
                                          ) => boolean
                                          Function to get the item's label.
                                              (
                                              item: T,
                                              ) => string
                                              The options of the select
                                              | Iterable<T, any, any>
                                              | Readonly<
                                              Iterable<T, any, any>
                                              >
                                              Function to get the item's unique value.
                                                  (
                                                  item: T,
                                                  ) => string
                                                  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
                                                      (
                                                      item: T,
                                                      ) => boolean
                                                      Description
                                                      Function to determine if a node is disabled.
                                                          Type
                                                          (
                                                          item: T,
                                                          ) => string
                                                          Description
                                                          Function to get the item's label.
                                                              Type
                                                              | Iterable<T, any, any>
                                                              | Readonly<
                                                              Iterable<T, any, any>
                                                              >
                                                              Description
                                                              The options of the select
                                                              Type
                                                              (
                                                              item: T,
                                                              ) => string
                                                              Description
                                                              Function to get the item's unique value.
                                                                  A collection of list items, commonly used in Select and Combobox components.
                                                                  PropType
                                                                  Append items to the collection
                                                                  (
                                                                  items: Array<T>,
                                                                  ) => ListCollection<T>
                                                                  Get the item based on its index
                                                                  (
                                                                  index: number,
                                                                  ) => T
                                                                  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

                                                                  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
                                                                    }
                                                                    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,
                                                                      ) => {
                                                                      height?: number
                                                                      width?: number
                                                                      x?: number
                                                                      y?: number
                                                                      }
                                                                      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
                                                                      | {
                                                                      ancestorResize?: boolean
                                                                      ancestorScroll?: boolean
                                                                      animationFrame?: boolean
                                                                      elementResize?: boolean
                                                                      layoutShift?: boolean
                                                                      }
                                                                      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
                                                                              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,
                                                                              ) => {
                                                                              height?: number
                                                                              width?: number
                                                                              x?: number
                                                                              y?: number
                                                                              }
                                                                              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
                                                                                | {
                                                                                ancestorResize?: boolean
                                                                                ancestorScroll?: boolean
                                                                                animationFrame?: boolean
                                                                                elementResize?: boolean
                                                                                layoutShift?: boolean
                                                                                }
                                                                                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.
                                                                                      Last updated on by Ryan Bower