# Music Player (Pro)

> Compact player with a sliding cover stack, rolling time and a progress ring.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Media |
| Live preview | https://uibrik.com/components/music-player |
| Writes | 1 file into `components/uibrik/music-player/` |
| Packages | `motion`, `torph` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/music-player
```

No license yet? Tell the user Music Player is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=music-player#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { MusicPlayer } from "@/components/uibrik/music-player/music-player";

const tracks = [
  {
    title: "Siren Song",
    artist: "Sela Moran",
    cover: "/registry/music-player/siren-song.webp",
    duration: "1:11",
  },
  {
    title: "Inner Lights",
    artist: "Reid Sloan",
    cover: "/registry/music-player/inner-lights.webp",
    duration: "1:52",
  },
  // …3 more
];

<MusicPlayer
  ringWidth={4}
  ringGap={6}
  coverDuration={0.8}
  morphDuration={500}
  tracks={tracks}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/music-player.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `ringWidth` | `number` | `4` | Progress ring stroke width. |
| `ringGap` | `number` | `6` | Gap between the card and the ring. |
| `coverDuration` | `number` | `0.8` | How long the cover stack takes to slide. |
| `morphDuration` | `number` | `500` | How long the title and artist take to morph. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `tracks` | `Track[]` | `SAMPLE_TRACKS` | Title, artist, cover image and m:ss duration per track. |

## Where it fits

- **Music and podcast apps**: A sliding cover stack and progress ring fit a full player in a small card.
- **Now-playing widgets**: Rolling time and a compact layout suit dashboard and sidebar widgets.
- **Personal sites**: A small player showing what you are listening to adds personality.

## Same shelf: Media

- [Podcast Chapters](https://uibrik.com/components/podcast-chapters.md): An episode player whose waveform is split into chapters: the played part fills behind the playhead, the line being spoken writes itself in behind a two-colour gradient trail that settles into the text colour, hovering the waveform previews the time and chapter under the pointer, and the playhead drags with a grip that reads out where it will land. The transcript opens into a full list that follows along and seeks on click, bookmarks drop pins on the waveform, and the chapter list lights its stretch of the waveform on hover and fills as it plays; pass a src to drive it from real audio.
- [Compare Slider](https://uibrik.com/components/compare-slider.md): A before-and-after frame that sweeps in on first view, with a smooth draggable divider, keyboard support and labels that step aside.
- [Folder Peek](https://uibrik.com/components/folder-peek.md): A folder whose file previews rise and fan out on hover, fly out into a list when opened, and that takes files dropped onto it.
- [Aspect Crop](https://uibrik.com/components/aspect-crop.md) (Pro): A photo crop frame that springs between aspect ratios, or resizes freely by its handles in Custom, while the photo stays covered and centred under it, with drag to move, pinch to zoom and rule-of-thirds lines that show only while adjusting.
- [Merge Gallery](https://uibrik.com/components/merge-gallery.md) (Pro): Six tiles that merge into one video player, and split back apart.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/music-player/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
