Combobox
Searchable single-select built on Popover + Command (cmdk). Used for the TpEMIS university picker, program picker, and any other long lookup list where a plain Select would create a wall of options. Forwards refs and consumes semantic tokens, so brand overrides re-tint the focus ring and selected highlight automatically.
Default — university picker
Type-to-filter narrows the 10 stub tenants. Arrow keys + Enter select; Escape closes the popover.
Selected value: none
Program picker — preselected
Initial value renders without a placeholder. Same primitive, different label and option set.
With disabled options
Options can be flagged unavailable while still showing in the list.
Search disabled
Set searchable=false for short option lists where the search input would feel like overkill.
Disabled state
Trigger respects the same disabled styling as the rest of the form controls.
Accessibility
- Trigger gets
role="combobox"witharia-expandedtracking the popover state. aria-controlslinks the trigger to the listbox so screen readers expose the relationship.- Provide an
ariaLabelwhen no visible label sits above the trigger. - cmdk handles arrow-key navigation, type-to-filter, and Enter-to-select for free.
- Pass
nameto render a hidden input so the value submits inside an HTML form without extra plumbing.