Skip to content

Select

Single-select dropdown field.

<SelectStory {...args} />
<SelectStory {...args} />
<CustomOptionsStory {...args} />
<SelectStory {...args} />
<SelectStory {...args} />
<EmptySelectStory {...args} />
<SelectStory {...args} />
<SelectStory {...args} />
<SizesStory {...args} />
<SelectStory {...args} />
<SelectStory {...args} />
<EmptySelectStory {...args} />
<EmptySelectStory {...args} />

Single-select dropdown field.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the combobox button.
descriptionReactNodeSupporting text displayed below the label.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
hasSearchbooleanfalseWhether to show search input in the dropdown.
isDisabledbooleanfalseWhether the selector is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the selector is loading.
label*stringField label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string | null) => voidCalled when selection changes.
options*ReadonlyArray<SelectOptionDefinition>Options to display.
placeholderstring'Select...'Placeholder shown when no option is selected.
refRef<HTMLButtonElement>Ref forwarded to the combobox button.
renderOption(option: SelectOptionData) => ReactNodeCustom render function for selectable options.
searchPlaceholderstring'Search...'Search input placeholder.
size"sm" | "md" | "lg"'md'Select size.
startIconIconComponentStart icon rendered in the trigger.
statusInputStatusValidation status displayed below the selector.
styleCSSPropertiesInline styles applied to the field root.
value*string | nullSelected option value.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the combobox button.
descriptionReactNodeSupporting text displayed below the label.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
hasSearchbooleanfalseWhether to show search input in the dropdown.
isDisabledbooleanfalseWhether the selector is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the selector is loading.
label*stringField label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string | null) => voidCalled when selection changes.
options*ReadonlyArray<SelectOptionDefinition>Options to display.
placeholderstring'Select...'Placeholder shown when no option is selected.
refRef<HTMLButtonElement>Ref forwarded to the combobox button.
renderOption(option: SelectOptionData) => ReactNodeCustom render function for selectable options.
searchPlaceholderstring'Search...'Search input placeholder.
size"sm" | "md" | "lg"'md'Select size.
startIconIconComponentStart icon rendered in the trigger.
statusInputStatusValidation status displayed below the selector.
styleCSSPropertiesInline styles applied to the field root.
value*string | nullSelected option value.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the field root.
data-testidstringTest ID applied to the combobox button.
descriptionReactNodeSupporting text displayed below the label.
hasClearbooleanfalseWhether to show a clear button when a value is selected.
hasSearchbooleanfalseWhether to show search input in the dropdown.
isDisabledbooleanfalseWhether the selector is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the selector is loading.
label*stringField label.
labelIconIconComponentIcon shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
onChange*(value: string | null) => voidCalled when selection changes.
options*ReadonlyArray<SelectOptionDefinition>Options to display.
placeholderstring'Select...'Placeholder shown when no option is selected.
refRef<HTMLButtonElement>Ref forwarded to the combobox button.
renderOption(option: SelectOptionData) => ReactNodeCustom render function for selectable options.
searchPlaceholderstring'Search...'Search input placeholder.
size"sm" | "md" | "lg"'md'Select size.
startIconIconComponentStart icon rendered in the trigger.
statusInputStatusValidation status displayed below the selector.
styleCSSPropertiesInline styles applied to the field root.
value*string | nullSelected option value.
isOptionalfalse
isRequired*true

Helper layout for custom Select option rendering.

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the option layout.
data-testidstringTest ID applied to the option layout.
descriptionReactNodeSupporting text displayed below the label.
endContentReactNodeTrailing content.
iconIconComponentIcon displayed before the label.
label*ReactNodePrimary label.
refRef<HTMLSpanElement>Ref forwarded to the layout root.
styleCSSPropertiesInline styles applied to the layout root.