Combobox

Outside the canon

A 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

#field

Empty, 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-select

Same 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-row

size="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

NameTypeDefaultNotes
options{ value, label, description?, disabled? }[]—description is a second line: a price, a SKU, a code
valuestring—"" when nothing is chosen
onChange(value: string) => void—
placeholderstringSelect…Trigger text while nothing is chosen
search_placeholderstringStart typing to search…
empty_labelstringNo matches.Shown when the search matches nothing
sizesm | mdmd32px in a table cell or toolbar, 36px in a form — the field ladder
disabledbooleanfalseRenders the trigger alone: nothing to open, nothing to focus
errorbooleanfalseField error styling; the message belongs to FormField
aria-labelstring—Required when no <label> points at id (a table cell's control)