How it works
Equalizer bars are a row of rounded vertical bars that stretch and shrink in turn, like the level meter on an audio player. Each bar fills the container height and is squashed with transform: scaleY(0.35). The stretch keyframe pulls it to scaleY(1) at 20% and back to 0.35 by 40%, then it waits for the rest of the cycle. Because transform-origin stays at the center, bars grow up and down at the same time.
Stagger offsets each bar by its index, so the peak moves across the row. With the default 5 bars, 1s duration and 0.1s stagger, the wave crosses in half a second and pauses briefly before the next pass, which gives it a rhythm instead of a constant shimmer.
Bars fit music and podcast apps, voice input ("listening") states, and analytics tools where a chart-like shape feels on brand. Parameters: Bars (3 to 9), Height, Bar width, Color, Duration, Stagger and Easing. Gap is 70% of Bar width and the corner radius is half of it, so bars always end in round caps. For a voice recorder look, try 7 bars, 4px width and a smaller stagger like 0.06s.
Scaling with scaleY instead of animating height avoids layout work on every frame, and the bars never push surrounding content around. The row is marked role="status" with aria-label="Loading"; when you use it as a microphone level indicator, change the label to describe that state instead.
How do I make the bars grow only upwards?
Add transform-origin: bottom to the bar style in the copied CSS, and set align-items: flex-end on the container. The scaleY animation then anchors to the baseline, like a classic spectrum analyzer. In the React version add transformOrigin: "bottom" to the style of each bar element.
Why does the animation pause between waves?
The keyframe only moves between 0% and 40%. For the remaining 60% of the cycle each bar sits at its minimum height. Combined with the stagger, that leaves a short moment when all bars are low. If you want continuous motion, raise Stagger so the total offset (bars minus one, times stagger) is close to Duration.
Can I use different colors for each bar?
The editor uses one color for all bars. In the CSS output you can add nth-child rules that set a different background per bar, or use a single linear-gradient on the container with background-clip tricks. A simple option is to keep one color and vary opacity per bar for a subtle depth effect.