{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "headline-text-reveal",
  "type": "registry:block",
  "title": "Headline Text Reveal",
  "description": "A hero headline whose words rise into place one after another on scroll.",
  "dependencies": [
    "svg-scroll-draw"
  ],
  "files": [
    {
      "path": "registry/blocks/headline-text-reveal.tsx",
      "content": "'use client';\n\n/**\n * headline-text-reveal — a hero headline whose words rise into place one after\n * another as it scrolls into view, followed by the supporting line.\n *\n * Built on svg-scroll-draw (MIT): https://svg-scroll-draw.vercel.app/blocks\n * Needs: react, svg-scroll-draw. Styling: Tailwind CSS.\n *\n * The text stays one string in the server HTML, so search engines and screen\n * readers get the full sentence. Reduced motion is handled by the library: the\n * words are shown in place, with no animation.\n *\n * At the very top of a page the headline is already inside the trigger window\n * on load, so it starts part-way revealed. For a reveal that begins as soon as\n * the reader scrolls, pass `trigger={{ start: 'top bottom', end: 'top 20%' }}`.\n */\n\nimport { ScrollText } from 'svg-scroll-draw/react';\n\nexport interface HeadlineTextRevealProps {\n  eyebrow?: string;\n  /** Plain text only: the words are split at runtime. */\n  headline?: string;\n  /** Plain text only. */\n  subline?: string;\n  /** Heading level for the headline. Use 'h1' when this is the page's hero. */\n  as?: 'h1' | 'h2' | 'h3';\n  /** Scroll window for the headline, e.g. { start: 'top 90%', end: 'top 30%' }. */\n  trigger?: { start?: string; end?: string };\n  className?: string;\n}\n\nexport function HeadlineTextReveal({\n  eyebrow = 'Single-origin coffee',\n  headline = 'Coffee from three farms, roasted the week you drink it',\n  subline = 'Words arrive in reading order, at the pace the reader sets with their own scroll.',\n  as = 'h2',\n  trigger = { start: 'top 90%', end: 'top 35%' },\n  className = '',\n}: HeadlineTextRevealProps) {\n  return (\n    <section className={`mx-auto w-full max-w-4xl text-center ${className}`}>\n      <p className=\"font-mono text-xs text-neutral-600 dark:text-neutral-400\">\n        {eyebrow}\n      </p>\n\n      {/* `key` remounts the split if the text changes: ScrollText reads its\n          string once, on mount, and splits it into word spans. */}\n      <ScrollText\n        key={headline}\n        as={as}\n        split=\"words\"\n        stagger={0.08}\n        from={{ opacity: 0, y: 32 }}\n        easing=\"ease-out\"\n        once\n        trigger={trigger}\n        className=\"mt-4 text-[clamp(2.25rem,6vw,4.5rem)] font-medium leading-[0.95] tracking-tight text-neutral-950 text-balance dark:text-neutral-50\"\n      >\n        {headline}\n      </ScrollText>\n\n      <ScrollText\n        key={subline}\n        as=\"p\"\n        split=\"words\"\n        stagger={0.03}\n        from={{ opacity: 0, y: 12 }}\n        easing=\"ease-out\"\n        once\n        trigger={{ start: 'top 92%', end: 'top 55%' }}\n        className=\"mx-auto mt-6 max-w-2xl text-lg text-neutral-600 dark:text-neutral-400\"\n      >\n        {subline}\n      </ScrollText>\n    </section>\n  );\n}\n\nexport default HeadlineTextReveal;\n",
      "type": "registry:component",
      "target": "components/scroll/headline-text-reveal.tsx"
    }
  ],
  "categories": [
    "scroll",
    "hero",
    "text"
  ]
}
