Skip to main content
v7

MorphSelect

A select whose trigger grows into the list, with a gliding highlight, type-ahead, grouping and search.

Package@g4rcez/componentsSectionForm Controls

Examples

Language picker

Press the trigger, or focus it and press Enter, Space or an arrow key. Disabled options are skipped by the keyboard, and the value rolls up or down depending on where the new option sits in the list.

Controlled
Language

Value: typescript

Native form submission

Pass name and the value submits with the form, through a hidden input.

Form field
Runtime

Nothing submitted yet.

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.