Skip to content

Forms

Select

A styled native `<select>` — the closed state is ours, the open state belongs to the platform.

Select
import { Select } from '@anomalia/ui';

Notes

  • Deliberately not a custom listbox: on a phone the OS picker wins on scroll, search and assistive tech.
  • Pass options for the common case, or children for <optgroup> layouts.

Examples

Basics

A styled native select. The closed state is ours; the open state is the platform's — a wheel on iOS, a dialog on Android.

Applied to every generated caption

API

PropTypeDefaultDescription
valuestringBindable value.
optionsSelectOption[]`{ value, label, disabled? }`.
placeholderstringDisabled first option shown when empty.

Every component also forwards the native attributes of its root element, plus class, so anything not listed here still works.