combobox
a searchable field with a leaf list below it. the field owns the inside focus edge; the chosen option keeps its check over the raised hover fill.
bunx --bun shadcn@latest add @mk/comboboxexample
find a ship by name. clear the value to start again, or type a name the list does not contain to see the empty result.
type to narrow the list, then choose with the arrow keys and enter.
type to narrow the list, then choose with the arrow keys and enter.
selection
multiple selection keeps each ship in a 24 px chip. the list anchors to the whole field, and each chip has a remove control.
remove a chip with its close control, or add another ship.
remove a chip with its close control, or add another ship.
open
quanta is under the pointer; trisys is chosen. the list scrolls inside the leaf, leaving the contact edge outside.
draws where a floating layer meets the page, under its soft lift
empty
a search with no match keeps its field and explains the empty list.
states
the input-group box thickens on focus. invalid changes the edge and focus ink together; disabled keeps the full box.
rest
input-group field box
focus
2 px inside field edge
invalid
error edge and focus ink
invalid, focus
2 px inside field edge
disabled
faint fill, disabled ink
rest
input-group field box
focus
2 px inside field edge
invalid
error edge and focus ink
invalid, focus
2 px inside field edge
disabled
faint fill, disabled ink