{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-rotating-band",
  "type": "registry:component",
  "title": "CTA Rotating Band",
  "description": "A full width band over a drifting gradient mesh with grain, a headline whose middle word rotates with a blur slide and an underline timer, and two buttons.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "cta",
    "cta",
    "gradient",
    "rotating text",
    "band",
    "mesh",
    "buttons"
  ],
  "docs": "https://hyperblur.dev/effects/cta-rotating-band",
  "files": [
    {
      "path": "registry/hyperblur/cta-rotating-band.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/cta-rotating-band.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface CtaRotatingBandProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  before?: string;\n  words?: string[];\n  after?: string;\n  subtitle?: string;\n  interval?: number;\n  primaryCta?: { label: string; href: string };\n  secondaryCta?: { label: string; href: string };\n  note?: string;\n  accent?: string;\n  secondAccent?: string;\n}\n\nconst css = `\n.hb-yi5 {\n  --hb-yi5-a: #8b5cf6;\n  --hb-yi5-b: #22d3ee;\n  container-type: inline-size;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  background: #0a0a0a;\n  color: #fff;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yi5 *, .hb-yi5 *::before, .hb-yi5 *::after { box-sizing: border-box; }\n.hb-yi5-band { position: relative; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }\n.hb-yi5-mesh { position: absolute; inset: -40%; z-index: -2; filter: blur(60px) saturate(1.2); opacity: .95; }\n.hb-yi5-blob { position: absolute; width: 55%; height: 70%; border-radius: 50%; mix-blend-mode: screen; }\n.hb-yi5-blob:nth-child(1) { left: 10%; top: 20%; background: var(--hb-yi5-a); animation: hb-yi5-drift1 16s ease-in-out infinite; }\n.hb-yi5-blob:nth-child(2) { right: 8%; top: 30%; background: var(--hb-yi5-b); animation: hb-yi5-drift2 19s ease-in-out infinite; }\n.hb-yi5-blob:nth-child(3) { left: 35%; bottom: 10%; width: 40%; height: 50%; background: color-mix(in srgb, var(--hb-yi5-a) 50%, #f472b6); animation: hb-yi5-drift3 22s ease-in-out infinite; }\n.hb-yi5-band::before {\n  content: \"\"; position: absolute; inset: 0; z-index: -1;\n  background:\n    linear-gradient(180deg, rgba(10, 10, 10, .55), rgba(10, 10, 10, .2) 40%, rgba(10, 10, 10, .65)),\n    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 88px);\n}\n.hb-yi5-band::after {\n  content: \"\"; position: absolute; inset: 0; z-index: -1; opacity: .18; mix-blend-mode: overlay;\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E\");\n}\n.hb-yi5-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 88px 20px; text-align: center; display: grid; justify-items: center; }\n.hb-yi5-kicker {\n  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;\n  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); color: rgba(255, 255, 255, .9);\n}\n.hb-yi5-kicker b { padding: 2px 7px; border-radius: 999px; background: #fff; color: #0a0a0a; font-size: 11px; }\n.hb-yi5-title { margin: 0; font-size: clamp(34px, 7cqi, 80px); line-height: 1.02; letter-spacing: -.045em; font-weight: 650; max-width: 16ch; text-wrap: balance; }\n.hb-yi5-slot { position: relative; display: grid; justify-items: center; overflow: hidden; padding: .02em .06em .1em; margin: -.02em 0 -.04em; }\n.hb-yi5-word {\n  position: relative; grid-area: 1 / 1; display: inline-block; white-space: nowrap;\n  color: transparent; background: linear-gradient(100deg, #fff 10%, color-mix(in srgb, var(--hb-yi5-b) 60%, #fff) 50%, color-mix(in srgb, var(--hb-yi5-a) 55%, #fff) 90%);\n  -webkit-background-clip: text; background-clip: text;\n}\n.hb-yi5-word[data-state=\"in\"] { animation: hb-yi5-in .7s cubic-bezier(.2, .9, .2, 1) both; }\n.hb-yi5-word[data-state=\"out\"] { animation: hb-yi5-out .5s cubic-bezier(.6, 0, .8, .4) both; }\n.hb-yi5-underline { position: absolute; left: 0; right: 0; bottom: -.04em; height: .06em; border-radius: 99px; background: linear-gradient(90deg, var(--hb-yi5-b), var(--hb-yi5-a)); transform-origin: left; animation: hb-yi5-line var(--hb-yi5-dur) linear both; }\n.hb-yi5-sub { margin: 22px 0 0; max-width: 540px; font-size: clamp(15px, 1.8cqi, 18px); line-height: 1.6; color: rgba(255, 255, 255, .78); }\n.hb-yi5-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }\n.hb-yi5-btn {\n  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px;\n  font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s, box-shadow .25s, border-color .25s;\n}\n.hb-yi5-btn[data-kind=\"primary\"] { background: #fff; color: #0a0a0a; box-shadow: 0 1px 0 #fff inset, 0 18px 40px -16px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .08); }\n.hb-yi5-btn[data-kind=\"primary\"]:hover { transform: translateY(-2px); box-shadow: 0 1px 0 #fff inset, 0 24px 50px -16px rgba(0, 0, 0, .8), 0 0 0 8px rgba(255, 255, 255, .12); }\n.hb-yi5-btn[data-kind=\"ghost\"] { color: #fff; border: 1px solid rgba(255, 255, 255, .28); background: rgba(10, 10, 10, .25); backdrop-filter: blur(10px); }\n.hb-yi5-btn[data-kind=\"ghost\"]:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); }\n.hb-yi5-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }\n.hb-yi5-btn svg { width: 16px; height: 16px; transition: transform .25s; }\n.hb-yi5-btn:hover svg { transform: translateX(3px); }\n.hb-yi5-note { margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 13px; color: rgba(255, 255, 255, .65); }\n.hb-yi5-note span { display: inline-flex; align-items: center; gap: 6px; }\n.hb-yi5-note svg { width: 14px; height: 14px; color: color-mix(in srgb, var(--hb-yi5-b) 70%, #fff); }\n.hb-yi5-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n@keyframes hb-yi5-in { from { opacity: 0; transform: translateY(70%); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }\n@keyframes hb-yi5-out { from { opacity: 1; transform: none; filter: blur(0); } to { opacity: 0; transform: translateY(-70%); filter: blur(8px); } }\n@keyframes hb-yi5-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@keyframes hb-yi5-drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18%, 12%) scale(1.15); } }\n@keyframes hb-yi5-drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-20%, -10%) scale(.9); } }\n@keyframes hb-yi5-drift3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10%, -25%); } }\n@container (min-width: 760px) {\n  .hb-yi5-inner { padding: 128px 32px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yi5-blob, .hb-yi5-word, .hb-yi5-underline { animation: none !important; }\n  .hb-yi5-btn, .hb-yi5-btn svg { transition: none; }\n}\n`;\n\nfunction Check() {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n    </svg>\n  );\n}\n\nexport function CtaRotatingBand({\n  before = \"Ship your next\",\n  words = [\"launch page\", \"pricing page\", \"onboarding\", \"changelog\", \"docs site\"],\n  after = \"before Friday.\",\n  subtitle = \"Start from 300 production-ready sections, wire them to your data, and deploy to your own domain in an afternoon.\",\n  interval = 2600,\n  primaryCta = { label: \"Start building free\", href: \"#\" },\n  secondaryCta = { label: \"Book a 20 min demo\", href: \"#\" },\n  note = \"No credit card|Free for side projects|Cancel anytime\",\n  accent = \"#8b5cf6\",\n  secondAccent = \"#22d3ee\",\n  className = \"\",\n  style,\n  ...rest\n}: CtaRotatingBandProps) {\n  const [rot, setRot] = React.useState<{ index: number; prev: number | null }>({ index: 0, prev: null });\n  const { index, prev } = rot;\n  const count = words.length;\n\n  React.useEffect(() => {\n    if (count < 2) return;\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    const id = window.setInterval(() => {\n      setRot((r) => ({ index: (r.index + 1) % count, prev: r.index }));\n    }, Math.max(1200, interval));\n    return () => window.clearInterval(id);\n  }, [count, interval]);\n\n  const vars = { \"--hb-yi5-a\": accent, \"--hb-yi5-b\": secondAccent, \"--hb-yi5-dur\": `${Math.max(1200, interval)}ms`, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-yi5 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-cta-rotating-band\" precedence=\"default\">{css}</style>\n      <div className=\"hb-yi5-band\">\n        <div className=\"hb-yi5-mesh\" aria-hidden=\"true\">\n          <span className=\"hb-yi5-blob\" />\n          <span className=\"hb-yi5-blob\" />\n          <span className=\"hb-yi5-blob\" />\n        </div>\n        <div className=\"hb-yi5-inner\">\n          <p className=\"hb-yi5-kicker\">\n            <b>New</b>\n            Templates for every page you ship\n          </p>\n          <h2 className=\"hb-yi5-title\">\n            <span className=\"hb-yi5-sr\">{`${before} ${words.join(\", \")} ${after}`}</span>\n            <span aria-hidden=\"true\">\n              {before}\n              <span className=\"hb-yi5-slot\">\n                {prev !== null ? (\n                  <span key={`o${prev}-${index}`} className=\"hb-yi5-word\" data-state=\"out\">\n                    {words[prev]}\n                  </span>\n                ) : null}\n                <span key={`i${index}`} className=\"hb-yi5-word\" data-state={prev === null ? \"still\" : \"in\"}>\n                  {words[index]}\n                  <span className=\"hb-yi5-underline\" />\n                </span>\n              </span>\n              {after}\n            </span>\n          </h2>\n          {subtitle ? <p className=\"hb-yi5-sub\">{subtitle}</p> : null}\n          <div className=\"hb-yi5-actions\">\n            {primaryCta ? (\n              <a className=\"hb-yi5-btn\" data-kind=\"primary\" href={primaryCta.href}>\n                {primaryCta.label}\n                <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M5 12h14M13 6l6 6-6 6\" />\n                </svg>\n              </a>\n            ) : null}\n            {secondaryCta ? (\n              <a className=\"hb-yi5-btn\" data-kind=\"ghost\" href={secondaryCta.href}>\n                {secondaryCta.label}\n              </a>\n            ) : null}\n          </div>\n          {note ? (\n            <p className=\"hb-yi5-note\">\n              {note.split(\"|\").map((n) => (\n                <span key={n}>\n                  <Check />\n                  {n}\n                </span>\n              ))}\n            </p>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}