Skip to content
Sign in
AudioChapter waveformMenu

Chapter waveformPro

A waveform with chapter markers, titles and a jump list.

ProA 32 minute episode in six chapters; click the wave or a chapter to jump.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/chapter-waveform

Usage

tsx
import { ChapterWaveform } from "@/components/ui/chatcn/pro/chapter-waveform"

<ChapterWaveform peaks={peaks} duration={1902} currentTime={time} onSeek={seek} chapters={chapters} />

Built on the free waveform. Chapter breaks cut a gap in the wave; hovering shows the time and chapter under the pointer. The current chapter's title sits above and updates as playback crosses a break.

Examples

States

ProWaveform only and one chapter.

Props

PropTypeNotes
peaksnumber[]Any length and scale
duration, currentTime, onSeeknumberSeconds
chapters{ start, title }[]Oldest first
listbooleanShow the jump list. Default true

Accessibility

  • The wave is a slider: arrow keys step 5 s, Page Up and Page Down jump between chapters, Home and End go to the ends.
  • The current chapter is marked with aria-current in the list and announced politely.