components / sound-bars

sound-bars.

the little dancing meter that marks the row currently playing. pure css, no state — each bar's period and phase come from its index, so the pattern is identical on the server and the client. paused and reduced-motion hold resting heights rather than flattening.

sm
md
lg
accent

click the row to pause the meter.

installation
bunx @justin06lee/chrome@latest add sound-bars
props
nametypedefaultdescription
barsnumber4how many bars (1–12).
pausedbooleanfalsefreeze the bars low.
size'sm' | 'md' | 'lg''md'
accentstring'currentColor'css color of the bars; inherits the row it sits in by default.
speednumber1.1seconds for one full cycle of the slowest bar.
labelstring | null'playing'screen-reader text; null when an adjacent label already says it.
classNamestring-