select

The Select component provides a styled dropdown menu with async options support.

Usage

Default


<Select
  placeholder="Choose an option"
  options={[
    { label: "Option A", value: "a" },
    { label: "Option B", value: "b" },
    { label: "Option C", value: "c" },
  ]}
  value="a"
  onChange={(value) => console.log("Selected:", value)}
/>

Props

Data table
TypeDescription
aria-busybooleanIndicates the select is busy, useful while async options are loading.
aria-describedbystringOptional aria-describedby id reference for helper/error text.
aria-descriptionstringOptional description text for the select element.
aria-invalidbooleanMarks the field as invalid for assistive technology. If omitted, component logic may still infer invalid from state === "error".
aria-labelstringOptional aria-label for screen readers. Useful when no visible label is provided.
aria-labelledbystringOptional aria-labelledby id reference. Prefer this when an external label element exists.
aria-live"off" | "polite" | "assertive"Optional aria-live setting for async status messaging.
aria-requiredbooleanIndicates the field is required to assistive technology.
asyncOptions((query: string) => Promise<Option[]>)If provided, the select element will render options asynchronously. Should return a Promise resolving to Option[] based on search query.
autoCompletestringOptional autocomplete behavior for compatible use cases.
classNamestringAdditional class name(s) for custom styling.
data-testidstringOptional test ID for testing frameworks.
disabledbooleanWhether the select element is disabled.
formstringOptional form association.
idstringOptional id for the underlying select element.
labelReactNodeOptional visible label describing what the select is for.
labelPositionLabelPositionTypePosition of the label relative to the select.
namestringName for the select element.
onChange(value: string) => voidCallback fired when the selected option changes. Receives the new value as an argument.
optionsOption[]An array of options that will be rendered as dropdown choices.
outlinebooleanIf true, the select element is styled as outlined.
placeholderstringPlaceholder text to display when no option is selected.
pollIntervalnumberOptional polling interval for updating options in milliseconds.
requiredbooleanWhether the select element is required.
roleAriaRoleOptional role override. Usually not needed for a native select, but included for flexibility.
roundingRoundingTypeRounding style of the select element. "none" | "small" | "medium" | "large" | "full"
shadowShadowTypeShadow style of the select element. "none" | "light" | "medium" | "strong" | "intense"
stateStateTypeState variant for styling. "success" | "error" | "warning" | "disabled" | ""
tabIndexnumberOptional tab index for keyboard navigation control.
themeThemeTypeTheme for styling. "primary" | "secondary" | "tertiary" | "quaternary" | "clear"
valuestringThe current selected value.