Select
Select renders a styled native <select> from typed options; it needs no hydration and works with JavaScript off.
For search, multi-select or async options, use InputSelect, which is built on
react-select and needs a client runtime.Forms
When to use
Use when
- A short list of options is enough and the native picker is acceptable.
- The page renders as static markup with no client runtime.
- A plain
changeevent listener drives the control.
Avoid when
- Users need to search, pick several items or load options — use
InputSelect. - A few options should stay visible — use
RadioorOption.
Usage
<Select
name="theme"
aria-label="Theme"
defaultValue="light"
options={[
{ value: 'light', label: 'Light' },
{ value: 'dark', label: 'Dark' },
]}
/>Native <select> props pass through (name, value, defaultValue, onChange, disabled, required). The
control fills its parent unless you set width.
Size, radius and state
<Select size="small" options={options} />
<Select size="large" borderRadius="circular" options={options} />
<Select variant="error" options={options} />size is small, medium (default) or large, read from theme.component.select.size. borderRadius takes the
theme radius scale (straight for square corners). Without a variant, a required select whose first option has an
empty value paints the error border after interaction (:user-invalid).
Accessibility
Selectrenders no visible label: passaria-label, or useField.- The native control keeps platform keyboard and screen-reader behavior.
- Keyboard focus draws a
:focus-visibleoutline, kept in forced-colors mode. - Option colors are forced to dark text on the lightest surface so the OS popup stays readable.
Properties
Name
Type
Default
Description
options *SelectOption[]noneTyped options rendered as native `<option>` elements.
size"small""medium""large"'medium'Control size token (height + horizontal padding).
variant"default""success""error"'default'Visual variant reflecting validation state, consistent with the other
form controls (`Input`, `InputSelect`).