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

Sortable data table
PropTypeDefaultDescription
theme"primary" | "secondary" | "tertiary" | "quaternary" | "clear"Configured DefaultTheme color for the select.
state"" | "success" | "error" | "warning"-Visual state for feedback.
outlinebooleanfalseUse outlined style for the select.
rounding"none" | "small" | "medium" | "large"Configured DefaultCorner rounding for the select.
shadow"none" | "light" | "medium" | "strong" | "intense"Configured DefaultBox shadow style for the select.
optionsArray<{ label: string; value: string }>-Array of selectable options.
valuestring-Currently selected value.
onChange(value: string) => void-Change event handler for the select.
placeholderstring"Select an option"Placeholder when no value is selected.
ariaLabelstring-ARIA label for accessibility.
ariaDescriptionstring-ARIA description for accessibility.
disabledbooleanfalseDisable the select input.
asyncOptions() => Promise<{ label: string; value: string }[]>-Async function for loading options dynamically.
pollIntervalnumber0Interval (ms) for polling async options.
classNamestring-Custom class names for the outer wrapper.
data-testidstring"select"Test id for querying the component in tests.