Forms
Select
A dropdown for picking one value from a short list. Options are strings or value and label pairs.
Group: Forms. Exports: Select. shadcn/ui equivalent: Select (partial parity).
Usage
import { Select } from "./halaska-kit";
Select props
valueany: The controlled value.onChange(value) => void: Called with the new value.optionsarray: The choices to offer.placeholderstring: Hint shown while empty.labelstring: Visible label.disabledboolean: Prevents interaction and dims the control.sizestring(default "md"): Size of the control.styleCSSProperties: Inline style merged onto the root element.
Accessibility
- The trigger has the combobox role with aria-expanded, and a string label becomes its accessible name.
- Up and Down arrows open the list and move through it. Home, End, Enter, Space and Escape work, and typing jumps to a matching option.
- The list has listbox and option roles, and aria-selected marks the current value.
- Focus stays on the trigger, and the highlighted option is announced through aria-activedescendant.
Known gaps
- No option groups or separators.
- No disabled options.
- No invalid state, and no caption.
Used in
Halaska UI · Components · Patterns · Screens · Install