For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/select.md.

Select

Holds one answer, or several, chosen from a list — below about six options expose them instead with Radio or SegmentedControl, and reach for DropdownMenu when the items run commands rather than set a value. The trigger is composed rather than configured: SelectButton for a button-shaped trigger, SelectInput for one that looks like a field.

Source · Storybook

Usage

import { Select, SelectButton, SelectContent, SelectOption, SelectOptionIndicator, SelectOptionText, SelectPositioner } from '@wallarm-org/design-system/Select';

Examples

Sizes

The same height scale as the other fields, so a select sits in a row of inputs without breaking the line.

Different buttons

The trigger is yours to shape — labelled, icon-led, or value-only. Whatever it looks like, it must still read as something that opens.

Multiple

multiple collects several answers, and the trigger summarises them. Once past a couple of selections a summary beats a list, which is what WithTags is for.

Multiple with icons

Icons carry the option's identity into the closed trigger, which matters more in a multi-select where the text is compressed into a summary.

Grouped

SelectGroup with SelectGroupLabel splits a long list into named sections. Group when the reader would otherwise scan, not merely because the options have categories.

Disabled

The whole control is out, trigger included. Disabling individual options instead keeps the list honest about what exists.

Loading

loading on the root, for a list still being fetched. It holds the trigger's shape so the layout doesn't jump when the options land.

With select input

SelectInput makes the trigger look like a text field, which suits a select sitting in a form beside real inputs rather than in a toolbar.

With separator

SelectSeparator divides kinds of option — a destructive or clear-all entry from the real choices — where a group label would be overkill.

With icons

SelectValueIcon in the option and the trigger, so the chosen option keeps its icon once the menu closes.

SelectFooter pins content below the scrolling list, for a persistent escape like managing the options themselves.

SelectSearchInput with the useSelectSearch hook, plus SelectEmptyState for when nothing matches. Add search once the list outgrows a glance — roughly ten options.

With form field

Inside Field, so the label and description come from FieldLabel and FieldDescription rather than from the select.

With tags

Selections render as removable tags inside the field, which is the honest shape for multi-select when the reader needs to see and undo each choice individually.

Props

PropTypeDefaultDescription
formstring | undefinedThe associate form of the underlying select.
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring[] | undefinedThe initial default value of the select when rendered. Use when you don't need to control the value of the select.
autoFocusboolean | undefined
idstringThe unique identifier of the machine.
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
onSelect((details: SelectionDetails) => void) | undefinedFunction called when an item is selected
disabledboolean | undefinedfalseWhether the select is disabled
namestring | undefinedThe name attribute of the underlying select.
valuestring[] | undefinedThe controlled keys of the selected items
asChildboolean | undefinedUse the provided child element as the default rendered element, combining their props and behavior.
idsElementIds | undefinedThe ids of the elements in the select. Useful for composition.
defaultHighlightedValuestring | null | undefinedThe initial value of the highlighted item when opened. Use when you don't need to control the highlighted value of the select.
highlightedValuestring | null | undefinedThe controlled key of the highlighted item
onHighlightChangecomplexThe callback fired when the highlighted item changes.
loopFocusboolean | undefinedWhether to loop the keyboard navigation through the options
closeOnSelectboolean | undefinedWhether the select should close after an item is selected
openboolean | undefinedWhether the select menu is open
onOpenChange((details: OpenChangeDetails) => void) | undefinedFunction called when the popup is opened
defaultOpenboolean | undefinedWhether the select's open state is controlled by the user
compositeboolean | undefinedWhether the select is a composed with other composite widgets like tabs or combobox
onPointerDownOutsidecomplexFunction called when the pointer is pressed down outside the component
onFocusOutsidecomplexFunction called when the focus is moved outside the component
onInteractOutsidecomplexFunction called when an interaction happens outside the component
presentboolean | undefinedWhether the node is present (controlled by the user)
onExitCompleteVoidFunction | undefinedFunction called when the animation ends in the closed state
onEnterCompleteVoidFunction | undefinedFunction called when the animation ends in the open state
immediateboolean | undefinedWhether to synchronize the present change immediately or defer it to the next frame
autoCompletestring | undefinedThe autocomplete attribute for the hidden select. Enables browser autofill (e.g. "address-level1" for state).
readOnlyboolean | undefinedWhether the select is read-only
requiredboolean | undefinedWhether the select is required
invalidboolean | undefinedWhether the select is invalid
onValueChange((details: ValueChangeDetails<T>) => void) | undefinedThe callback fired when the selected item changes.
multipleboolean | undefinedWhether to allow multiple selection
collection *ListCollection<T>The collection of items
translationsIntlTranslations | undefinedSpecifies the localized strings that identifies the accessibility elements and their states
scrollToIndexFn((details: ScrollToIndexDetails) => void) | undefinedFunction to scroll to a specific index
deselectableboolean | undefinedWhether the value can be cleared by clicking the selected item. Note: this is only applicable for single selection
skipAnimationOnMountboolean | undefinedWhether to allow the initial presence animation.
hideMode"display-none" | "activity"How to hide content when mounted but not present. - 'display-none': HTML hidden attribute. Effects stay alive. - 'activity': React 19 <Activity mode="hidden">. Effects pause. Requires React 19+.
loadingboolean | undefinedfalse
positioningPositioningOptions | undefinedOverride default floating positioning (merged with DS defaults).
data-testidstring | undefined

SelectEmptyState

PropTypeDefaultDescription
descriptionReactNodeNo results

SelectFooter

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
variant{ default: string; actions: string; }default
data-testidstring | undefined

SelectOptionHint

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

SelectPositioner

PropTypeDefaultDescription
contentPropscomplexProps for the content element (the listbox panel inside the positioner) — for a ref, an inline measurement such as a locked width, or data-* attributes. className on the positioner itself already lands on the content, and overrides its default sizes (min-w-240 max-w-320 max-h-(--available-height)) through tailwind-merge.
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
asChildboolean | undefinedUse the provided child element as the default rendered element, combining their props and behavior.

SelectSearchInput

PropTypeDefaultDescription
value *string
onChange *(value: string) => void
onClear(() => void) | undefinedCalled when the built-in clear button empties the field, before onChange('').
titlestring | undefined
patternstring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
disabledboolean | undefined
namestring | undefined
altstring | undefined
heightstring | number | undefined
srcstring | undefined
widthstring | number | undefined
autoCompleteHTMLInputAutoCompleteAttribute | undefined
maxLengthnumber | undefined
minLengthnumber | undefined
placeholderstring | undefined
readOnlyboolean | undefined
requiredboolean | undefined
checkedboolean | undefined
stepstring | number | undefined
acceptstring | undefined
maxstring | number | undefined
minstring | number | undefined
multipleboolean | undefined
data-testidstring | undefined

SelectSeparator

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

Explorer