Wave Bars
betaRounded vertical bars whose heights ripple in a travelling wave, for voice or audio activity.
- Feedback
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add wave-barsnpm packages installed: class-variance-authority.
import { WaveBars } from "@/components/ui/wave-bars";Default
Demo
Colours
<WaveBars>
| Prop | Type | Default |
|---|---|---|
activeWhether sound is flowing. Inactive, the bars rest low and still. | boolean | true |
barsHow many bars. | number | 5 |
labelAn accessible name. With one it is a polite status; without, it is hidden decoration. | string | — |
size | "sm" | "md" | "lg" | "xl" | "md" |
Plus every attribute of <div> except children.
With `label` the root is role="status" and the label is visually hidden text, so it is announced once rather than on every frame; without a label the whole indicator is aria-hidden and should sit beside visible text. It is an indicator (data-motion="indicator"): under reduced motion the wave slows to half speed instead of freezing, because a still meter would falsely say nothing is being heard. Set `active={false}` to settle the bars when there is silence. The wave never mirrors in right-to-left layouts.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes