{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "expanding-hero-event-demo",
  "type": "registry:block",
  "title": "Expanding Hero: Event",
  "description": "Scroll Video Hero example, Event: A conference hero with an aftermovie and a bolder headline. The date and city chips live inside the halves, so they fly off with the words. A take on the video (video player) and scroll animation (on scroll). Fits hero, portfolio and events sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "hero",
    "portfolio",
    "events",
    "video",
    "scroll-animation",
    "scroll"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/expanding-hero#expanding-hero-event-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/expanding-hero.json"
  ],
  "files": [
    {
      "path": "components/expanding-hero-event-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { ExpandingHero } from \"@/components/ui/expanding-hero\";\n\nconst film = \"https://assets.mixkit.co/videos/13222/13222-720.mp4\";\nconst poster = \"https://assets.mixkit.co/videos/13222/13222-thumb-720-0.jpg\";\n\nconst days = [\n  {\n    day: \"Day 1\",\n    date: \"Thu, Sept 24\",\n    sessions: [\"Opening keynote\", \"The craft of small details\", \"Designing for motion\", \"Evening party\"],\n  },\n  {\n    day: \"Day 2\",\n    date: \"Fri, Sept 25\",\n    sessions: [\"Tools for thinking\", \"Building design systems that last\", \"Live redesign\", \"Closing keynote\"],\n  },\n];\n\nexport function ExpandingHeroEventDemo() {\n  const scrollRef = React.useRef<HTMLDivElement>(null);\n  const filmRef = React.useRef<HTMLVideoElement>(null);\n\n  return (\n    <div className=\"relative w-full overflow-hidden rounded-xl border border-zinc-200 bg-white text-zinc-950 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50\">\n      <div ref={scrollRef} className=\"relative h-[var(--demo-height,36rem)] overflow-y-auto overscroll-contain\">\n        <ExpandingHero\n          containerRef={scrollRef}\n          stageClassName=\"h-[var(--demo-height,36rem)]\"\n          headlineClassName=\"font-bold tracking-[-0.06em] text-[clamp(3rem,19cqw,7rem)] @3xl:text-[clamp(3rem,11cqw,11rem)]\"\n          windowClassName=\"@3xl:w-[1.8em]\"\n          radius=\"0.3em\"\n          // Anything inside a half travels with it, so the chips fly off with the words.\n          before={\n            <span className=\"relative\">\n              Config\n              <Chip className=\"bottom-full left-[0.08em] mb-3\">\n                <span className=\"size-1.5 rounded-full bg-orange-500\" />\n                Sept 24–25\n              </Chip>\n            </span>\n          }\n          after={\n            <span className=\"relative\">\n              2026\n              <Chip className=\"top-full right-[0.08em] mt-3\">San Francisco</Chip>\n            </span>\n          }\n          media={<video ref={filmRef} src={film} poster={poster} autoPlay muted loop playsInline />}\n          overlay={\n            <button\n              type=\"button\"\n              onClick={() => watch(filmRef.current)}\n              className=\"flex items-center gap-3 rounded-full bg-white py-2 pr-5 pl-2 text-sm font-medium text-zinc-950 shadow-xl shadow-black/30 transition-transform duration-150 ease-out active:scale-[0.97]\"\n            >\n              <span className=\"grid size-8 place-items-center rounded-full bg-orange-500 text-white\">\n                <svg viewBox=\"0 0 16 16\" aria-hidden className=\"ml-0.5 size-3 fill-current\">\n                  <path d=\"M4 2.6v10.8a.6.6 0 0 0 .9.5l8.6-5.4a.6.6 0 0 0 0-1L4.9 2.1a.6.6 0 0 0-.9.5Z\" />\n                </svg>\n              </span>\n              Watch the 2025 aftermovie\n            </button>\n          }\n        >\n          <p className=\"mt-12 max-w-xs text-base text-balance text-zinc-600 @3xl:mt-6 sm:text-lg dark:text-zinc-400\">\n            Two days on design, craft and the tools behind them.\n          </p>\n          <a\n            href=\"#tickets\"\n            className=\"rounded-full bg-orange-500 px-5 py-2.5 text-sm font-medium text-white transition-[background-color,scale] duration-150 ease-out hover:bg-orange-600 active:scale-[0.97]\"\n          >\n            Get tickets\n          </a>\n        </ExpandingHero>\n\n        <section className=\"mx-auto max-w-3xl px-6 py-16 sm:py-24\">\n          <h2 className=\"text-sm font-medium text-zinc-500\">Schedule</h2>\n          <div className=\"mt-6 grid gap-10 sm:grid-cols-2\">\n            {days.map((day) => (\n              <div key={day.day}>\n                <p className=\"flex items-baseline justify-between border-b border-zinc-950/10 pb-3 dark:border-white/10\">\n                  <span className=\"text-lg font-semibold tracking-tight\">{day.day}</span>\n                  <span className=\"text-sm text-zinc-500\">{day.date}</span>\n                </p>\n                <ul className=\"mt-3 space-y-2.5 text-sm text-zinc-600 dark:text-zinc-400\">\n                  {day.sessions.map((session) => (\n                    <li key={session}>{session}</li>\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </div>\n        </section>\n      </div>\n    </div>\n  );\n}\n\nfunction Chip({ className, children }: { className?: string; children: React.ReactNode }) {\n  return (\n    <span\n      className={`absolute flex items-center gap-2 rounded-full px-3 py-1.5 text-[13px] leading-none font-medium tracking-normal whitespace-nowrap text-zinc-600 ring-1 ring-zinc-950/10 dark:text-zinc-300 dark:ring-white/15 ${className}`}\n    >\n      {/* Keeps the chip's words apart from the headline's in the page text; a flex row doesn't draw it. */}\n      {\" \"}\n      {children}\n    </span>\n  );\n}\n\n/** Plays the film from the top, full screen. */\nfunction watch(video: HTMLVideoElement | null) {\n  if (!video) return;\n  video.currentTime = 0;\n  void video.play();\n  if (video.requestFullscreen) void video.requestFullscreen();\n  else (video as HTMLVideoElement & { webkitEnterFullscreen?: () => void }).webkitEnterFullscreen?.();\n}\n"
    }
  ]
}