A music player on the Card tray, with an equalizer, live progress and a compact mini player.
FreeWeb and MobileMotion
Preview
npx shadcn add @fetaui/now-playingPlayground
Now playing
Low Tide
Pale Harbor
1:123:12
Playing
Now playing
Low Tide
Pale Harbor
1:123:12
Paused
Paused
Static Bloom
Juniper Wire
0:382:47
Compact
Low Tide
Pale Harbor · 1:12
State
Icons animation
Compact
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/now-playing
Playing
The bar and clock run on their own unless you pass elapsed.
Now playing
Low Tide
Pale Harbor
1:123:12
Compact
Accessibility
- Every control is a labelled button, and Shuffle and Repeat use aria-pressed.
- Progress is a native slider that reads like 1:12 of 3:12.
- The equalizer is decorative, and the words Now playing or Paused say the state.
Motion
- The equalizer bars rise and fall out of phase on a 900 ms loop, and pause offscreen.
- Pausing settles the bars at 3 px and morphs the icon in 200 ms.
- Progress keeps its place, and follows the pointer while seeking.
- With reduced motion, the bars stay still and the icon swaps.
Responsive behavior
- 384 px on Web and 358 px on Mobile.
- On Mobile, the play button grows to 52 px.
- Compact is 68 px tall on both.
Performance
- The equalizer is a CSS animation, paused by one shared observer when it leaves the screen.
- The progress bar is a transform on the fill, updated once a second.
- The timer stops while paused, while seeking and when you control elapsed.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import NowPlaying and NowPlayingArt from @/components/fetaui/now-playing and pass track with title, artist and length in seconds.
- No audio plays. Connect playing, elapsed and onSeek to your player. Without elapsed the card keeps its own clock.
- onNext, onPrevious and onMore are yours. Shuffle only toggles, with onShuffleChange to read it. Repeat restarts the track on the card's own clock, and onRepeatChange reports it.
- compact is the one line mini player, without seek, Previous or More. Composes Card and Icon Button.
Related
Clip TrimmerComponentKeep part of a clip with an ink range over a filmstrip.Voice ControlComponentRound controls for voice and call surfaces, with a live level meter while listening.SliderComponentPick a value or a range by dragging. Line for forms, Bold for a headline value, Field for dense inspectors, all with one or two thumbs.CardComponentThe container most of fetaUI is built on: an inset card on a soft tray, with actions on the tray.Bento WidgetComponentOne dashboard tile in three sizes: Revenue, Active users, Activity, Notes, Uptime and Storage, in ink steps.