# Podcast Chapters

> 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.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Media |
| Live preview | https://uibrik.com/components/podcast-chapters |
| Writes | 1 file into `components/uibrik/podcast-chapters/` |
| Packages | `@tabler/icons-react`, `motion` (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 26, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/podcast-chapters.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/podcast-chapters`.

Can't run commands? https://uibrik.com/components/podcast-chapters/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

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

```tsx
import { PodcastChapters } from "@/components/uibrik/podcast-chapters/podcast-chapters";

const chapters = [
  { title: "Cold open", start: 0 },
  { title: "Why most apps feel loud", start: 184 },
  // …4 more
];

const transcript = [
  { time: 0, speaker: "Ana", text: "Welcome back. Today is all about software that gets out of the way." },
  { time: 702, speaker: "Ana", text: "So let's talk about motion. When does an animation actually help?" },
  // …14 more
];

<PodcastChapters
  title="Designing calm software"
  show="Field Notes · Ep. 142"
  color="#e5484d"
  trailColors={["#ff4d6d", "#ffb547"]}
  autoPlay
  defaultTime={742}
  defaultTranscriptOpen={false}
  bars={96}
  width={460}
  chapters={chapters}
  transcript={transcript}
  duration={2910}
  defaultBookmarks={[412, 1588]}
  speeds={[1, 1.5, 2]}
  onTimeChange={(seconds) => {}}
  // src="…"
  // bookmarks={[0]}
  // onBookmarksChange={(seconds) => {}}
/>
```

## Tune it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"Designing calm software"` | Episode title. |
| `show` | `string` | `"Field Notes · Ep. 142"` | Show name and episode number. |
| `color` | `string` | `"#e5484d"` | Colour of the played waveform and the current chapter. |
| `trailColors` | `string[]` | `["#ff4d6d","#ffb547"]` | The two colours of the trail that leads the transcript in, front first. |
| `autoPlay` | `boolean` | `true` | Start simulated playback on mount. |
| `defaultTime` | `number` | `742` | Where playback starts. |
| `defaultTranscriptOpen` | `boolean` | `false` | Show the full transcript on mount. |
| `bars` | `number` | `96` | Number of waveform bars. |
| `width` | `number` | `460` | Width of the card; never wider than its container. |

## Wire it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `chapters` | `{ title: string; start: number }[]` |  | Chapter titles and start times in seconds. |
| `transcript` | `{ time: number; speaker?: string; text: string }[]` |  | Lines with the second they start; the current one shows under the waveform. |
| `duration` | `number` | `2910` | Episode length in seconds; read from the audio when src is set. |
| `src` | `string` |  | Audio file. Without it, playback is simulated. |
| `bookmarks / onBookmarksChange` | `number[] / (seconds: number[]) => void` |  | Saved moments in seconds, controlled; shown as pins on the waveform. |
| `defaultBookmarks` | `number[]` |  | Bookmarks on mount when uncontrolled. |
| `speeds` | `number[]` | `[1, 1.5, 2]` | Speeds the speed button cycles through. |
| `onTimeChange` | `(seconds: number) => void` |  | Called about once a second while playing, and on every seek. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Podcast and audio apps**: Chapters on the waveform and a live transcript line make a long episode easy to skim. Pairs with [Music Player](https://uibrik.com/components/music-player.md) (Pro).
- **Course and lecture players**: Learners jump to the section they need, and the transcript shows what they are hearing. Pairs with [Voice Note](https://uibrik.com/components/voice-note.md) (Pro).
- **Show pages on marketing sites**: An episode with chapters and quotes reads well before anyone presses play.

## Same shelf: Media

- [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.
- [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.
- [Merge Gallery](https://uibrik.com/components/merge-gallery.md) (Pro): Six tiles that merge into one video player, and split back apart.
- [Music Player](https://uibrik.com/components/music-player.md) (Pro): Compact player with a sliding cover stack, rolling time and a progress ring.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/podcast-chapters/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
