MorphSelect
A select whose trigger grows into the list, with a gliding highlight, type-ahead, grouping and search.
Examples
Value: typescript
Grouped options with search
Groups keep their headings and empty ones disappear while searching. Search turns on automatically above eight options and matches the label, the meta text (here the release year) and keywords, ignoring case and accents. Use align end near the right edge so the surface grows leftward.
When to use MorphSelect
Use when
Use MorphSelect for compact pickers and form fields with up to a few hundred options, such as a language, a runtime or a package manager, with or without icons, groups and trailing meta text.
Avoid when
Avoid it for mostly free-text entry or very long remote lists, where Autocomplete fits, for choosing several values, where MultiSelect fits, and for actions rather than stored values, where Menu fits.
Accessibility
The trigger is a combobox with aria-haspopup, aria-expanded and aria-activedescendant; with search on, the search input becomes the combobox. Options are listbox options and groups are labelled. Arrows, PageUp/PageDown (eight at a time), Home, End, type-ahead, Enter or Space to pick, Alt+ArrowUp to pick and close, Escape to close and Tab to leave without picking. A polite status announces the result count or No matches.