Wave Bars Loader
A deterministic 4-bar traveling-wave loader with mint bars morphing through descending, flat, and ascending states.
Installation#
pnpm dlx shadcn@latest add @davinciui/wave-bars-loaderUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
sizeTotal height in px; bar width, gap, radius, and glow scale from it. | number | 60 |
colorSolid fill color of the bars. | string | "#42E6C6" |
speedSpeed multiplier. 1 = reference speed, 0.5 = slower, 2 = faster. | number | 1 |
gapHorizontal gap between bars in px. | number | size * 0.11 |
barWidthWidth of each bar in px. | number | size * 0.32 |
borderRadiusCorner radius of each bar in px. | number | barWidth * 0.3 |
glowEnables a subtle soft aura around the bars. | boolean | true |
glowIntensityGlow strength multiplier. | number | 1 |
pausedFreezes the animation. | boolean | false |
ariaLabelAccessible label for the loading status. | string | "Loading" |
classNameAdditional CSS classes for the loader wrapper. | string | — |
Accessibility#
The wrapper uses role=status with aria-label, defaulting to Loading, and the bars are aria-hidden, so screen readers get one status announcement. The ariaLabel prop customizes the announced text.
Motion#
Four bars morph height through keyframes with linear easing; speed divides a 1.8s base duration, and paused freezes playback. A prefers-reduced-motion media query disables the animation, leaving static staircase heights.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

