A music card: cover art that leans toward the pointer, a scrubbable progress bar, transport controls and an accent picked from the artwork.

Take Care
Drake
pnpm dlx shadcn@latest add @latheui/now-playingPart of Lathe Pro. Set up your project once with your license key: npx latheui init --key <key>. See Lathe Pro.
Now Playing is part of Lathe Pro
The preview is live and free to try. The source, the install and every assembly come with Pro: $79 once, with lifetime updates.
Depends on
Also accepts native section attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
| tracks* (required) | { title: string; artist: string; cover: string; duration: number; src?: string }[] | — | The queue. With src the audio plays; without it, playback is simulated for designs and demos. |
| index | number | — | Controlled index of the current track. |
| defaultIndex | number | 0 | Track to start on. |
| onIndexChange | (index: number) => void | — | Called when the track changes. |
| playing | boolean | — | Controlled: whether it is playing. |
| defaultPlaying | boolean | false | Start playing. |
| onPlayingChange | (playing: boolean) => void | — | Called on play and pause. |
| layout | "card" | "bar" | "card" | A card with a large cover, or a compact row. |
| tilt | number | 10 | Degrees the cover leans toward the pointer. 0 keeps it flat. |
| glow | boolean | true | A blurred copy of the cover glowing behind it, brighter while playing. |
| accent | "auto" | string | "auto" | Color of the progress and the card's wash. Auto picks the cover's most vivid color. |
<NowPlaying tracks={tracks} accent="var(--chart-2)" />const [playing, setPlaying] = React.useState(false)
<NowPlaying tracks={tracks} playing={playing} onPlayingChange={setPlaying} />