Select
A dropdown selector (APG listbox) with search, object items, groups with headers, an icon per item, and automatic positioning. The arrows, Home, End and, without a search box, type-ahead move through the options in the order they are drawn.
Install: pnpm add-component Fields/Select
Simple select
The select can take a simple array of strings. Search is disabled here.
Searchable objects
Use objects for more control and enable the search bar for long lists.
Groups and icons
Items with a group are drawn together under a header: a role="group" named by it, so a screen reader says the group as you enter it. Search keeps a header only while its group has a match. An icon shows before the label, and in the trigger once picked.
Validation & states
Show errors or put the field in a readonly state.
API
modelValue(string | number): The selected value (v-model).label(string): Label displayed above the select field.items(string[] | SelectItem[]): List of options: strings, or SelectItem objects { label, value, group?, icon? }. Items sharing a group are listed together under a header; items without one come first.placeholder(string): Placeholder when no value is selected.searchable(boolean): Enable a search bar inside the dropdown.readonly(boolean): Disable the selector.error(string): Error message to display below.