SakaniUI

Select

A custom, fully-styled single-select dropdown, not a native <select>.

Built as a real listbox rather than wrapping the native element, since a native dropdown renders an OS-level popup that can't be styled to match the design.

Error state

Select a country to continue.

Props

PropTypeDefaultDescription
options{ label: string; value: string; disabled?: boolean }[]The list of selectable options.
labelstringField label.
descriptionstringHelp text under the field.
errorstringSets the error state and shows this message.
size'sm' | 'md' | 'lg''md'Field height.
valuestringControlled selected value.
defaultValuestringUncontrolled initial value.
onChange(value: string) => voidFires with the new value on selection.
disabledbooleanfalseDisables the field.

Why it works this way

Why

  • It is a custom listbox, not a native <select>: the native one opens an operating-system dropdown that can't be styled, so the open state never matched the design.
  • It is fully keyboard operable: Enter or Space opens, arrows move, Home and End jump, Escape closes.

Don't

  • Don't use it for long or searchable lists. Use Combobox.
  • Don't use it for two or three options. Radio or SegmentedControl is faster.