Combobox
Outside the canonA Select you can type in, for the lists a real account makes long — products, customers, jurisdictions. Outside the canon's vocabulary; flagged in HANDOFF.md for a new row. Deliberately not a new shape: same trigger box as Select, same height ladder, same chevron, so a form reads as one thing and swapping one for the other only adds the ability to type. The panel is the canon Popover (2px stone-dark, brutalist shadow), sized to the trigger, holding shadcn's cmdk list reshaped to the tokens. Mustard marks the row the keyboard is on ("you are here right now"); navy checks the row that is chosen ("you have chosen this"), as in the sort menu. In the app this is tom-select through the existing tom_select controller — a <select> with a controller attached, not this markup.
App: tom_select Stimulus controller (existing)
Combobox
#fieldEmpty, filled, disabled and error. Type to filter; mustard marks the row the keyboard is on, navy checks the one chosen. A disabled one is the trigger alone — nothing to open.
Type to filter; the second line is the price.
Enabled once a Customer is chosen
Choose a product for this line.
Beside a Select
#beside-selectSame box, same height, same chevron: only the ability to type differs. Which one a field gets is a question about the list, not about the form — a long list earns the search, six fixed options do not.
Long list: search earns its place
Six fixed options: a search box would be furniture
In a table row
#in-rowsize="sm" puts it on the 32px rung with the row's other controls. The panel keeps its own width, so a narrow cell still gets a readable list.
Props
| Name | Type | Default | Notes |
|---|---|---|---|
| options | { value, label, description?, disabled? }[] | — | description is a second line: a price, a SKU, a code |
| value | string | — | "" when nothing is chosen |
| onChange | (value: string) => void | — | |
| placeholder | string | Select… | Trigger text while nothing is chosen |
| search_placeholder | string | Start typing to search… | |
| empty_label | string | No matches. | Shown when the search matches nothing |
| size | sm | md | md | 32px in a table cell or toolbar, 36px in a form — the field ladder |
| disabled | boolean | false | Renders the trigger alone: nothing to open, nothing to focus |
| error | boolean | false | Field error styling; the message belongs to FormField |
| aria-label | string | — | Required when no <label> points at id (a table cell's control) |