Skip to content
nexubDesign System
v12.7.0

Components · Form Controls

Select

StableAdded v0.0.1

Accessible dropdown select built on Radix UI. Supports groups and search.

import { Select } from '@nexub/react';
View as Markdown

Usage

Use it for
  • 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

Use something else for
  • 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

TSX
<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

  • default
  • disabled

Props

Props
PropTypeDefaultDescription
valuestring—Controlled selected value.
onValueChange(value: string) => void—Callback when value changes.
placeholderstring—Placeholder when no value selected.
disabledbooleanfalseDisables 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.

Select design tokens
TokenAliasesNotes
--field-bg--color-surface-container-lowest—
--field-fg--color-on-surface—
--field-border--color-outline—
--field-radius--shape-field—
CSS
/* One area of your app */
.checkout {
  --field-bg: var(--color-secondary);
}