For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
60
Sponsor

Pill Karaoke

Karaoke-style captions in a rounded pill container — active word snaps to full contrast, others stay dimmed.

Customize
60
6
1

Installation

$ pnpm dlx shadcn@latest add @framecn/caption-pill-karaoke

Usage

import { CaptionPillKaraoke } from "@/components/framecn/caption-pill-karaoke";
import type { CaptionWord } from "@/components/framecn/caption-pill-karaoke";
const words: CaptionWord[] = [
  { text: "Every", start: 0.0, end: 0.35 },
  { text: "great", start: 0.35, end: 0.65 },
  // ...
];
 
<CaptionPillKaraoke words={words} />;

API Reference

CaptionPillKaraoke

PropTypeDefault
wordsCaptionWord[](demo words)
wordsPerSegmentnumber6
activeColorstring"#1a1a1a"
dimColorstring"#a6a6a6"
pillColorstring"#e7e5e7"
fontSizenumber60
fontWeightnumber700
backgroundstring"#0a0a0a"
speednumber1
fpsnumber30
durationInFramesnumber180
widthnumber1280
heightnumber720
classNamestring-

CaptionWord

FieldTypeDescription
textstringThe word text
startnumberStart time in seconds
endnumberEnd time in seconds

Notes