{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "counter-curtain-demo",
  "type": "registry:block",
  "title": "Counter Curtain: Studio Portfolio",
  "description": "Page Preloader example, Studio Portfolio: The default counter over a studio's home page. The nav, headline, links and photo each rise as the curtain clears them. Press reload in the address bar to play it again. A take on the preloader (loading screen). Fits preloader, hero and portfolio sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "preloader",
    "hero",
    "portfolio",
    "number-counter",
    "text"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/counter-curtain#counter-curtain-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/counter-curtain.json"
  ],
  "files": [
    {
      "path": "components/counter-curtain-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { CounterCurtain, CounterCurtainLine } from \"@/components/ui/counter-curtain\";\n\nconst photo =\n  \"https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=900&h=1100&q=80\";\n\n// The reload button plays it again by remounting it with a new key. On a real\n// site, drop `contained` and `once={false}`: it covers the screen, once per\n// visit.\nexport function CounterCurtainDemo() {\n  const [run, setRun] = React.useState(0);\n\n  return (\n    <div className=\"flex h-[var(--demo-height,36rem)] w-full flex-col overflow-hidden rounded-xl border border-zinc-200 bg-[#f3f1ec] text-zinc-950 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50\">\n      <BrowserBar url=\"okto.studio\" run={run} onReload={() => setRun((r) => r + 1)} />\n      <CounterCurtain key={run} contained once={false} className=\"@container min-h-0 flex-1\">\n        <div className=\"flex h-full flex-col px-5 pt-4 pb-5 sm:px-8 sm:pt-5 sm:pb-7\">\n          <header className=\"flex items-center justify-between text-sm\">\n            <CounterCurtainLine className=\"font-semibold tracking-tight\">Okto°</CounterCurtainLine>\n            <nav className=\"hidden gap-6 text-zinc-600 @md:flex dark:text-zinc-400\">\n              {[\"Work\", \"Studio\", \"Journal\"].map((item) => (\n                <CounterCurtainLine key={item}>{item}</CounterCurtainLine>\n              ))}\n            </nav>\n            <CounterCurtainLine>Contact</CounterCurtainLine>\n          </header>\n\n          <div className=\"mt-auto flex items-end gap-8\">\n            <div className=\"min-w-0 flex-1\">\n              <CounterCurtainLine className=\"text-xs tracking-[0.18em] text-zinc-500 uppercase\">\n                Independent design studio, Oslo\n              </CounterCurtainLine>\n              <h1 className=\"mt-4 text-[clamp(2.75rem,10cqw,7rem)] leading-[0.92] font-semibold tracking-[-0.05em]\">\n                <CounterCurtainLine>Brands that</CounterCurtainLine>{\" \"}\n                <CounterCurtainLine>move before</CounterCurtainLine>{\" \"}\n                <CounterCurtainLine>they speak.</CounterCurtainLine>\n              </h1>\n              <div className=\"mt-6 flex flex-wrap items-end justify-between gap-x-8 gap-y-4 sm:mt-8\">\n                <CounterCurtainLine className=\"max-w-xs text-sm leading-relaxed text-pretty text-zinc-600 dark:text-zinc-400\">\n                  Identity, websites and motion for companies that would rather be felt\n                  than explained.\n                </CounterCurtainLine>\n                <CounterCurtainLine>\n                  <a\n                    href=\"#work\"\n                    className=\"group inline-flex items-center gap-2 text-sm font-medium underline decoration-zinc-400 underline-offset-4 transition-colors hover:decoration-current\"\n                  >\n                    See the work\n                    <span aria-hidden className=\"transition-transform duration-200 group-hover:translate-x-0.5\">\n                      →\n                    </span>\n                  </a>\n                </CounterCurtainLine>\n              </div>\n            </div>\n            {/* An image rises out of its frame like a line does. */}\n            <CounterCurtainLine className=\"hidden w-[30%] shrink-0 rounded-lg @2xl:block\">\n              <img\n                src={photo}\n                alt=\"A low timber and glass house lit up at dusk\"\n                className=\"aspect-[4/5] w-full rounded-lg object-cover\"\n              />\n            </CounterCurtainLine>\n          </div>\n        </div>\n      </CounterCurtain>\n    </div>\n  );\n}\n\nfunction BrowserBar({ url, run, onReload }: { url: string; run: number; onReload: () => void }) {\n  return (\n    <div className=\"flex h-10 shrink-0 items-center gap-3 border-b border-zinc-200 bg-white/60 px-3 dark:border-zinc-800 dark:bg-zinc-900/60\">\n      <div aria-hidden className=\"flex gap-1.5\">\n        {[0, 1, 2].map((dot) => (\n          <span key={dot} className=\"size-2.5 rounded-full bg-zinc-300 dark:bg-zinc-700\" />\n        ))}\n      </div>\n      <button\n        type=\"button\"\n        onClick={onReload}\n        aria-label=\"Reload to play it again\"\n        title=\"Play again\"\n        className=\"grid size-7 place-items-center rounded-md text-zinc-500 transition-[background-color,color,scale] duration-150 hover:bg-zinc-200/70 hover:text-zinc-900 active:scale-[0.94] dark:hover:bg-zinc-800 dark:hover:text-zinc-100\"\n      >\n        <svg\n          viewBox=\"0 0 16 16\"\n          fill=\"none\"\n          stroke=\"currentColor\"\n          strokeWidth=\"1.5\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          className=\"size-3.5 transition-[rotate] duration-500 ease-[cubic-bezier(0.22,1,0.36,1)]\"\n          style={{ rotate: `${run * 360}deg` }}\n        >\n          <path d=\"M13.5 8a5.5 5.5 0 1 1-1.6-3.9\" />\n          <path d=\"M13.5 2.5v3h-3\" />\n        </svg>\n      </button>\n      <span className=\"mx-auto truncate rounded-md bg-zinc-100 px-3 py-1 font-mono text-[11px] text-zinc-500 dark:bg-zinc-800/80 dark:text-zinc-400\">\n        {url}\n      </span>\n      <span aria-hidden className=\"w-[4.75rem]\" />\n    </div>\n  );\n}\n"
    }
  ]
}