native select
the native browser choice inside a square field box, or a quiet word beside a list. the chevron stays quiet while the box draws the inside focus edge.
bunx --bun shadcn@latest add @mk/native-selectexample
choose the ship new runs open in. the browser supplies the open menu, option groups and keyboard navigation. trisys shows an unavailable option.
new runs open in orbit
new runs open in orbit
sizes
default is 40 px high and small is 32 px, and both are 44 px on a phone. the native options and right-hand chevron stay the same.
sm
32 px high
default
40 px high
sm
32 px high
default
40 px high
states
rest and hover keep the input edge. focus draws 2 px inside, in the error ink when invalid. disabled uses faint stock and disabled words. the open menu belongs to the browser.
rest
1 px input edge
hover
keeps the input edge
focus
2 px house edge, inside
empty
native placeholder option
invalid
error edge
invalid, focus
2 px error edge, inside
disabled
faint fill, disabled words
rest
1 px input edge
hover
keeps the input edge
focus
2 px house edge, inside
empty
native placeholder option
invalid
error edge
invalid, focus
2 px error edge, inside
disabled
faint fill, disabled words
the quiet form
variant="quiet" sets a scope beside a list: a muted word and its chevron, right-aligned with no box, 44 px at every width. the word turns foreground on hover, and keyboard focus draws the same 2 px edge inside its 44 px. the browser still supplies the menu.
showing every ship
showing every ship
rest
muted word and chevron
hover
foreground word
focus
2 px inside edge
disabled
disabled word and chevron
rest
muted word and chevron
hover
foreground word
focus
2 px inside edge
disabled
disabled word and chevron