Equalizer
The "this is playing" mark a music app puts on a track.
Now playingNow playingNow playingPausedPaused
View code
<Equalizer label="Now playing" />
<div data-audio-paused>
<Equalizer label="Paused" />
</div>Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { Equalizer } from "@sdxc/ui/audio";Renders the bars in the current text color at 1em square. They hold still under reduced
motion and inside any [data-audio-paused] ancestor.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | No | What a screen reader hears in place of the bars, such as "Now playing". |
Also accepts everything in Omit<TagProps<"span">, "children">.