Components · Form Controls
Select
Accessible dropdown select built on Radix UI. Supports groups and search.
import { Select } from '@nexub/react';Usage
Choosing a single option from a list of 5+ items
When screen space is limited and a dropdown collapses the options
Selecting a region, country, currency, or other enumerated value
Filtering or configuring a setting with predefined choices
Fewer than 5 options — use RadioGroup to keep choices visible
Searching or typing to find an option — use Combobox instead
Multi-select — use Combobox or a checkbox list
Boolean on/off choices — use Switch or Checkbox
Playground
Props
<Select.Root>…</Select.Root>Examples
Default
Sizes and read-only
size on Select.Trigger matches Input. A readOnly trigger keeps its value readable and does not open.
States
defaultdisabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | Controlled selected value. |
| onValueChange | (value: string) => void | — | Callback when value changes. |
| placeholder | string | — | Placeholder when no value selected. |
| disabled | boolean | false | Disables the select. |
Design tokens
Select reads these component tokens. Each one is unset by default and falls back to the semantic role it aliases, so nothing changes until you set it. Set one on any element to restyle every Select below it, and leave the roles other components share alone. See the three token tiers.
Input, Textarea, Select and Combobox triggers.
| Token | Aliases | Notes |
|---|---|---|
| --field-bg | --color-surface-container-lowest | — |
| --field-fg | --color-on-surface | — |
| --field-border | --color-outline | — |
| --field-radius | --shape-field | — |
/* One area of your app */
.checkout {
--field-bg: var(--color-secondary);
}On iOS & Android: Select
import { Select } from '@nexub/react-native';
<Select label="Country" options={countries} value={country} onValueChange={setCountry} />Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| Menu | A popover listbox. | Opens a BottomSheet of options; options array. |
| Label | Compose Label + control + HelperText (or FormField). | One component: label, helperText and error are props. |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
Select props
| Prop | Type | Default | Description |
|---|---|---|---|
| labelrequired | string | — | — |
| optionsrequired | readonly SelectOption<T>[] | — | — |
| value | T | — | — |
| defaultValue | T | — | — |
| onValueChange | (value: T) => void | — | — |
| placeholder | string | — | — |
| helperText | string | — | — |
| error | string | — | — |
| disabled | boolean | — | — |
| style | StyleProp<ViewStyle> | — | — |