{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cinema-credits-roll",
  "type": "registry:component",
  "title": "Cinema Credits Roll",
  "description": "End credits that roll up a dark frame with roles and names aligned on a center gutter, cast and crew sections and a closing studio mark. Hovering or pressing Pause stops the roll.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "cinematic",
    "cinematic",
    "credits",
    "scroll",
    "team",
    "about",
    "film"
  ],
  "docs": "https://hyperblur.dev/effects/cinema-credits-roll",
  "files": [
    {
      "path": "registry/hyperblur/cinema-credits-roll.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/cinema-credits-roll.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface CinemaCreditsLine {\n  role: string;\n  names: string[];\n}\n\nexport interface CinemaCreditsBlock {\n  heading?: string;\n  lines: CinemaCreditsLine[];\n}\n\nexport interface CinemaCreditsRollProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  blocks?: CinemaCreditsBlock[];\n  note?: string;\n  endCard?: string;\n  duration?: number;\n  paused?: boolean;\n  defaultPaused?: boolean;\n  onPausedChange?: (paused: boolean) => void;\n  accent?: string;\n  headingAs?: \"h1\" | \"h2\";\n}\n\nconst defaultBlocks: CinemaCreditsBlock[] = [\n  {\n    lines: [\n      { role: \"Directed by\", names: [\"Mira Okafor\"] },\n      { role: \"Written by\", names: [\"Mira Okafor\", \"Henrik Saar\"] },\n      { role: \"Produced by\", names: [\"Lior Adler\", \"Maya Brandt\"] },\n    ],\n  },\n  {\n    heading: \"Cast\",\n    lines: [\n      { role: \"Elena Voss\", names: [\"Ines Carvalho\"] },\n      { role: \"Tomas Reyes\", names: [\"Jonah Vale\"] },\n      { role: \"The Keeper\", names: [\"Teo Lindqvist\"] },\n      { role: \"Ada\", names: [\"Priya Raman\"] },\n    ],\n  },\n  {\n    heading: \"Crew\",\n    lines: [\n      { role: \"Director of Photography\", names: [\"Sun-Hee Park\"] },\n      { role: \"Production Designer\", names: [\"Bastien Moreau\"] },\n      { role: \"Editor\", names: [\"Dana Whitlock\"] },\n      { role: \"Original Music\", names: [\"Arvo Ness\"] },\n      { role: \"Sound Design\", names: [\"Kofi Mensah\", \"Rhea Patel\"] },\n      { role: \"Costume Designer\", names: [\"Lucía Ferrer\"] },\n      { role: \"Visual Effects\", names: [\"Northlight Studio\"] },\n      { role: \"Colorist\", names: [\"Anouk de Vries\"] },\n    ],\n  },\n];\n\nconst css = `\n.hb-vc3 {\n  --hb-vc3-accent: #d7c49e;\n  --hb-vc3-dur: 38s;\n  position: relative;\n  box-sizing: border-box;\n  display: block;\n  width: 100%;\n  height: 580px;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: radial-gradient(90% 70% at 50% 50%, #0d0c0b, #000 80%);\n  color: #ece6da;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-vc3 *, .hb-vc3 *::before, .hb-vc3 *::after { box-sizing: border-box; }\n.hb-vc3-viewport {\n  position: absolute;\n  inset: 0;\n  overflow: hidden;\n  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);\n  mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);\n}\n.hb-vc3-roll {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 56px;\n  padding: 0 24px;\n  animation: hb-vc3-roll var(--hb-vc3-dur) linear infinite;\n  animation-delay: calc(var(--hb-vc3-dur) * -.12);\n  will-change: transform;\n}\n.hb-vc3[data-paused=\"true\"] .hb-vc3-roll,\n.hb-vc3-viewport:hover .hb-vc3-roll { animation-play-state: paused; }\n@keyframes hb-vc3-roll {\n  from { top: 100%; transform: translate3d(0, 0, 0); }\n  to { top: 0%; transform: translate3d(0, -100%, 0); }\n}\n.hb-vc3-title {\n  margin: 0;\n  font-family: var(--font-grotesk, var(--font-sans, ui-sans-serif, system-ui, sans-serif));\n  font-size: clamp(28px, 6cqi, 64px);\n  font-weight: 600;\n  letter-spacing: .28em;\n  text-align: center;\n  text-transform: uppercase;\n}\n.hb-vc3-block { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; max-width: 720px; }\n.hb-vc3-heading {\n  margin: 0;\n  color: var(--hb-vc3-accent);\n  font-size: 11px;\n  font-weight: 600;\n  letter-spacing: .5em;\n  text-transform: uppercase;\n}\n.hb-vc3-heading::after {\n  content: \"\";\n  display: block;\n  width: 28px;\n  height: 1px;\n  margin: 14px auto 0;\n  background: currentColor;\n  opacity: .6;\n}\n.hb-vc3-list { display: grid; gap: 14px; width: 100%; margin: 0; }\n.hb-vc3-line {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);\n  align-items: baseline;\n}\n.hb-vc3-role {\n  margin: 0;\n  color: rgba(236, 230, 218, .5);\n  font-size: clamp(10px, 1.2cqi, 12px);\n  font-weight: 500;\n  letter-spacing: .2em;\n  text-align: right;\n  text-transform: uppercase;\n}\n.hb-vc3-names { display: flex; flex-direction: column; gap: 4px; grid-column: 3; margin: 0; }\n.hb-vc3-name {\n  color: #f4efe5;\n  font-size: clamp(14px, 1.9cqi, 19px);\n  font-weight: 500;\n  letter-spacing: .04em;\n}\n.hb-vc3-note {\n  max-width: 460px;\n  margin: 0;\n  color: rgba(236, 230, 218, .45);\n  font-size: 12px;\n  line-height: 1.7;\n  letter-spacing: .06em;\n  text-align: center;\n}\n.hb-vc3-end {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 14px;\n  padding-bottom: 40px;\n}\n.hb-vc3-mark {\n  display: grid;\n  place-items: center;\n  width: 64px;\n  height: 64px;\n  border: 1px solid rgba(236, 230, 218, .35);\n  border-radius: 50%;\n  color: var(--hb-vc3-accent);\n}\n.hb-vc3-endtext {\n  margin: 0;\n  font-size: 11px;\n  letter-spacing: .5em;\n  text-transform: uppercase;\n  color: rgba(236, 230, 218, .62);\n}\n.hb-vc3-hud {\n  position: absolute;\n  left: clamp(14px, 3cqi, 28px);\n  right: clamp(14px, 3cqi, 28px);\n  bottom: 16px;\n  z-index: 2;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  color: rgba(236, 230, 218, .45);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 10.5px;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n}\n.hb-vc3-toggle {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  height: 30px;\n  padding: 0 12px 0 10px;\n  border: 1px solid rgba(236, 230, 218, .16);\n  border-radius: 999px;\n  background: rgba(20, 18, 16, .7);\n  color: rgba(236, 230, 218, .8);\n  font: inherit;\n  cursor: pointer;\n  transition: border-color .25s ease, color .25s ease;\n}\n.hb-vc3-toggle:hover { border-color: rgba(236, 230, 218, .4); color: #fff; }\n.hb-vc3-toggle:focus-visible { outline: 2px solid var(--hb-vc3-accent); outline-offset: 3px; }\n.hb-vc3-side {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  z-index: 1;\n  width: 14px;\n  background: repeating-linear-gradient(180deg, transparent 0 10px, rgba(236, 230, 218, .07) 10px 18px);\n  pointer-events: none;\n}\n.hb-vc3-side[data-side=\"l\"] { left: 10px; }\n.hb-vc3-side[data-side=\"r\"] { right: 10px; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-vc3-roll { animation: none; position: relative; top: 0; padding-top: 48px; padding-bottom: 64px; }\n  .hb-vc3-viewport { overflow-y: auto; }\n  .hb-vc3-toggle { display: none; }\n}\n`;\n\nexport function CinemaCreditsRoll({\n  title = \"The Long Quiet\",\n  blocks = defaultBlocks,\n  note = \"Filmed on location in Reykjavík, Iceland and Lisbon, Portugal. No lighthouses were harmed in the making of this picture.\",\n  endCard = \"Halden Pictures\",\n  duration = 38,\n  paused,\n  defaultPaused = false,\n  onPausedChange,\n  accent = \"#d7c49e\",\n  headingAs = \"h2\",\n  className,\n  style,\n  ...rest\n}: CinemaCreditsRollProps) {\n  const Heading = headingAs;\n  const [inner, setInner] = React.useState(defaultPaused);\n  const isPaused = paused ?? inner;\n  const toggle = () => {\n    const next = !isPaused;\n    if (paused === undefined) setInner(next);\n    onPausedChange?.(next);\n  };\n  const vars = { \"--hb-vc3-accent\": accent, \"--hb-vc3-dur\": `${duration}s`, ...style } as React.CSSProperties;\n\n  return (\n    <section\n      className={[\"hb-vc3\", className].filter(Boolean).join(\" \")}\n      style={vars}\n      data-paused={isPaused ? \"true\" : \"false\"}\n      aria-label={`${title} credits`}\n      {...rest}\n    >\n      <style href=\"hb-cinema-credits-roll\" precedence=\"default\">{css}</style>\n      <span className=\"hb-vc3-side\" data-side=\"l\" aria-hidden=\"true\" />\n      <span className=\"hb-vc3-side\" data-side=\"r\" aria-hidden=\"true\" />\n      <div className=\"hb-vc3-viewport\">\n        <div className=\"hb-vc3-roll\">\n          <Heading className=\"hb-vc3-title\">{title}</Heading>\n          {blocks.map((block, bi) => (\n            <div className=\"hb-vc3-block\" key={bi}>\n              {block.heading ? <h3 className=\"hb-vc3-heading\">{block.heading}</h3> : null}\n              <dl className=\"hb-vc3-list\">\n                {block.lines.map((line, li) => (\n                  <div className=\"hb-vc3-line\" key={li}>\n                    <dt className=\"hb-vc3-role\">{line.role}</dt>\n                    <dd className=\"hb-vc3-names\">\n                      {line.names.map((n) => (\n                        <span className=\"hb-vc3-name\" key={n}>{n}</span>\n                      ))}\n                    </dd>\n                  </div>\n                ))}\n              </dl>\n            </div>\n          ))}\n          {note ? <p className=\"hb-vc3-note\">{note}</p> : null}\n          <div className=\"hb-vc3-end\">\n            <span className=\"hb-vc3-mark\" aria-hidden=\"true\">\n              <svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" fill=\"none\">\n                <circle cx=\"13\" cy=\"13\" r=\"11\" stroke=\"currentColor\" strokeWidth=\"1.2\" />\n                <circle cx=\"13\" cy=\"7.5\" r=\"2.2\" fill=\"currentColor\" />\n                <circle cx=\"13\" cy=\"18.5\" r=\"2.2\" fill=\"currentColor\" />\n                <circle cx=\"7.5\" cy=\"13\" r=\"2.2\" fill=\"currentColor\" />\n                <circle cx=\"18.5\" cy=\"13\" r=\"2.2\" fill=\"currentColor\" />\n              </svg>\n            </span>\n            <p className=\"hb-vc3-endtext\">{endCard}</p>\n          </div>\n        </div>\n      </div>\n      <div className=\"hb-vc3-hud\">\n        <span aria-hidden=\"true\">End credits · 01:52:14</span>\n        <button type=\"button\" className=\"hb-vc3-toggle\" onClick={toggle} aria-pressed={isPaused}>\n          {isPaused ? (\n            <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\"><path d=\"M1 0.5 L9.5 5 L1 9.5Z\" fill=\"currentColor\" /></svg>\n          ) : (\n            <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\"><path d=\"M1.5 0.5h2.4v9H1.5zM6.1 0.5h2.4v9H6.1z\" fill=\"currentColor\" /></svg>\n          )}\n          {isPaused ? \"Resume\" : \"Pause\"}\n        </button>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}