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

Highlight

Word-by-word captions with an accent-colored highlight background that sweeps in behind each spoken word.

Customize
72
3
1

Installation

$ pnpm dlx shadcn@latest add @framecn/caption-highlight

Usage

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

API Reference

CaptionHighlight

PropTypeDefault
wordsCaptionWord[](demo words)
wordsPerGroupnumber3
colorstring"#ffffff"
highlightColorstring"#ff1745"
fontSizenumber72
fontWeightnumber800
backgroundstring"#0a0a0a"
speednumber1
fpsnumber30
durationInFramesnumber180
widthnumber1280
heightnumber720
classNamestring-

CaptionWord

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

Notes