Skip to content
Sign in
AudioLyrics syncMenu

Lyrics syncPro

Lyrics highlighted line and word in time with playback.

ProLines and words light in time; scroll away to stop following.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/lyrics-sync

Usage

tsx
import { LyricsSync } from "@/components/ui/chatcn/pro/lyrics-sync"

<LyricsSync lines={lines} currentTime={time} onSeek={seek} />

Give lines word timings to light each word as it is sung; without them the whole line lights at once. The view follows the current line until the reader scrolls, then offers a way back. Reduced motion jumps instead of scrolling smoothly.

Examples

States

ProLine timing only, the intro, and no synced lyrics.

Props

PropTypeNotes
lines{ start, end, text, words?, section? }[]Seconds
currentTime, onSeeknumberPlayback
heightnumber | stringScrolling view. Default 360

Accessibility

  • Each line is a button with its start time; the current line is marked with aria-current.
  • The line being sung is announced politely, once per line.