ui-kit0.0

Forms

Select

A compact choice with a keyboard-friendly list.

Usage

A styled single choice. The trigger looks and behaves like an Input; the options open in a floating list that sits in the browser top layer, so no overflow: hidden parent clips it. Inside a Field it picks up the label, hint, error, required and disabled state.

Meeting invites and digests use this time zone.

When to use

  • Choosing one value from a short or medium list: time zone, role, billing period.
  • Options that need groups, icons or a check mark that a native select cannot draw.

Not for: very long lists that need searching (use a combobox), picking several values (use multi-select), or when the platform picker is best on phones (use the native select).

Sizes

32, 36 and 44px tall, matching the input.

Controlled, invalid and disabled

Use value and onValueChange to control it. A disabled item is skipped by the keyboard and typeahead. A field-level disabled state dims and locks the trigger.

Fixed after the workspace is created.

API

Select

PropTypeDefaultDescription
valuestring—Controlled value. '' means nothing selected.
defaultValuestring''Initial value when uncontrolled.
onValueChange(value: string) => void—Called when the person picks an option.
open / defaultOpen / onOpenChangeboolean—Control the list open state.
namestring—Submits the value with a surrounding form through a hidden input.
disabledbooleanfalseDisables the trigger.

SelectTrigger

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Height: 32 / 36 / 44px.
placeholderstring—Shown while nothing is selected (when you pass no children).
...propsButtonHTMLAttributes—Forwarded to the <button>, including ref, id and aria-label.

SelectItem

PropTypeDefaultDescription
valuestring—Unique, non-empty value.
disabledboolean—Cannot be chosen; skipped by the keyboard.
textValuestring—Plain text for typeahead when children are not text.

Also: SelectContent (the floating list), SelectValue (custom trigger content), SelectGroup with a label, SelectLabel and SelectSeparator.

Keyboard

KeyAction
Enter · Space · ↓Open the list on the selected option (or the first).
↑Open on the selected option (or the last).
↓ / ↑ (open)Move the highlight.
Home · EndFirst or last option.
Type charactersJump to the next option that starts with them.
Enter · Space (open)Choose the highlighted option and close.
EscClose without changing the value; focus stays on the trigger.

Accessibility

  • The trigger is a button with role="combobox", aria-expanded, aria-controls and aria-activedescendant (the WAI-ARIA select-only combobox pattern). Focus never leaves it.
  • The list is role="listbox"; options are role="option" with aria-selected. Groups use role="group" with their label.
  • Inside a Field the label names the trigger, and the hint and error are described by it.

Motion

  • The list rises 4px with a light blur in 150ms and leaves faster. The check mark scales in on the snappy spring.
  • Reduced motion: the list still opens and closes, without movement.