Black Friday: 30% off Pro

Get 30% off

Updated

Podcast Chapters

New

Preview

Customize

Color
Trail
Start at742s
Bars96
Width460px

Installation

npx shadcn@latest add https://uibrik.com/r/podcast-chapters.json
Adds the files to components/uibrik/podcast-chapters and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/podcast-chapters.

Usage

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) => {}}/>

Where to use Podcast Chapters

  • Podcast and audio apps

    Chapters on the waveform and a live transcript line make a long episode easy to skim.

    Pairs with Music Player

  • Course and lecture players

    Learners jump to the section they need, and the transcript shows what they are hearing.

    Pairs with Voice Note

  • Show pages on marketing sites

    An episode with chapters and quotes reads well before anyone presses play.

Props

PodcastChapters
title
Type string
"Designing calm software"
Episode title.
show
Type string
"Field Notes · Ep. 142"
Show name and episode number.
color
Type string
"#e5484d"
Colour of the played waveform and the current chapter.
trailColors
Type string[]
["#ff4d6d","#ffb547"]
The two colours of the trail that leads the transcript in, front first.
autoPlay
Type boolean
true
Start simulated playback on mount.
defaultTime
Type number
742
Where playback starts.
defaultTranscriptOpen
Type boolean
false
Show the full transcript on mount.
bars
Type number
96
Number of waveform bars.
width
Type number
460
Width of the card; never wider than its container.
chapters
Type { title: string; start: number }[]
–
Chapter titles and start times in seconds.
transcript
Type { time: number; speaker?: string; text: string }[]
–
Lines with the second they start; the current one shows under the waveform.
duration
Type number
2910
Episode length in seconds; read from the audio when src is set.
src
Type string
–
Audio file. Without it, playback is simulated.
bookmarks / onBookmarksChange
Type number[] / (seconds: number[]) => void
–
Saved moments in seconds, controlled; shown as pins on the waveform.
defaultBookmarks
Type number[]
–
Bookmarks on mount when uncontrolled.
speeds
Type number[]
[1, 1.5, 2]
Speeds the speed button cycles through.
onTimeChange
Type (seconds: number) => void
–
Called about once a second while playing, and on every seek.
className
Type string
–
Classes for the wrapper.