ui-kit0.0

Forms

Native select

The browser select, styled.

Usage

The browser’s own <select>, styled to match the input, with a chevron. You keep everything native: the large touch pickers on phones, type-ahead, form submission and autofill. Use plain <option> and <optgroup> children.

Opens the picker built into your phone or computer.

When to use

  • A short or medium list where the platform picker is the best experience: country, time zone, billing period.
  • Forms that must work well on phones, with no custom popup to maintain.

Not for: lists that need search, icons, multi-select chips or custom option layouts (use a custom select or combobox).

Sizes

32, 36 and 44px tall, matching the input. On touch devices the text is 16px so iOS Safari does not zoom on focus.

States and groups

An option with an empty value that is selected reads as a placeholder. Use optgroup to group long lists.

API

NativeSelect

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Height 32 / 36 / 44px.
wrapperClassNamestring—Class for the wrapper around the select and chevron (width, margins).
...propsSelectHTMLAttributes—Forwarded to <select>, including ref, value, defaultValue, onChange, disabled, multiple.

In plain HTML: ui-select-wrap around ui-select and an icon with ui-select-icon.

Keyboard

Native behaviour; it differs slightly per browser and platform.

KeyAction
Space / Enter / Alt + DownOpens the list.
Up / DownChanges the selected option.
Type a letterJumps to the next option starting with it.
EscCloses the list.

Accessibility

  • A real select element: role, value, expanded state and screen reader announcements are native.
  • The chevron is decorative and does not intercept clicks.
  • Inside a Field the id, description, invalid and required state are wired automatically.
  • Without a visible label, give the select an aria-label.

Motion

  • Border, ring and chevron colour transition over 150ms. The open list is drawn by the browser.
  • Reduced motion keeps the colour change.