{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "nautilus-demo",
  "type": "registry:block",
  "title": "Nautilus: Selected Work",
  "description": "Spiral Image Carousel example, Selected Work: An architecture studio's selected work, with the project's caption, prev / next and a pause button beside the spiral. A take on the spiral gallery (spiral carousel). Fits portfolio, hero and shop sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "portfolio",
    "hero",
    "shop",
    "spiral-gallery",
    "carousel",
    "image-gallery",
    "gallery",
    "motion"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/nautilus#nautilus-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/nautilus.json"
  ],
  "files": [
    {
      "path": "components/nautilus-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Nautilus } from \"@/components/ui/nautilus\";\n\nconst photo = (id: string) =>\n  `https://images.unsplash.com/photo-${id}?auto=format&fit=crop&w=880&h=1100&q=80`;\n\nconst WORK = [\n  {\n    src: photo(\"1486718448742-163732cd1544\"),\n    alt: \"Two sweeping terracotta facades of fine horizontal ribs curving apart against a clear blue sky\",\n    title: \"Rib Pavilion\",\n    place: \"Valencia\",\n    year: \"2025\",\n    note: \"Two terracotta walls of fine ribs that curl apart to frame a slice of sky.\",\n  },\n  {\n    src: photo(\"1771520711516-4b677ab05542\"),\n    alt: \"A sculptural armchair made of one looping off-white upholstered tube in a pale room\",\n    title: \"Loop Lounge Chair\",\n    place: \"Milan\",\n    year: \"2024\",\n    note: \"One upholstered tube, bent five times, made for a hotel lobby.\",\n  },\n  {\n    src: photo(\"1758800601480-49aa0f18c1f1\"),\n    alt: \"Curved wood-panelled walls ribboning around a narrow slot of daylight\",\n    title: \"Slot House\",\n    place: \"Kyoto\",\n    year: \"2023\",\n    note: \"Curved oak walls that ribbon around a single slot of daylight.\",\n  },\n  {\n    src: photo(\"1620395458832-6436796c2d4c\"),\n    alt: \"An orange-walled room with a small white round table and red chairs, a turquoise wall at the edge\",\n    title: \"Naranja Café\",\n    place: \"Lisbon\",\n    year: \"2025\",\n    note: \"An orange room for twelve tables, with one turquoise wall to rest the eye.\",\n  },\n  {\n    src: photo(\"1785295061892-44a42aa9ed65\"),\n    alt: \"A white nested archway framing a wide stair, with a white arcade and desert plants under a blue sky\",\n    title: \"Arch Court\",\n    place: \"Marrakech\",\n    year: \"2024\",\n    note: \"Nested white arches that step the stair down into a desert garden.\",\n  },\n  {\n    src: photo(\"1782852884076-d964a06242af\"),\n    alt: \"A red arched panelled door with a fanlight between two gold wall lamps on pale yellow brick\",\n    title: \"Red Door House\",\n    place: \"Porto\",\n    year: \"2023\",\n    note: \"A townhouse entrance rebuilt around its original fanlight.\",\n  },\n  {\n    src: photo(\"1599004831521-f9b1f81f5a84\"),\n    alt: \"A green-framed chair with a light wood back and an orange seat against a teal wall\",\n    title: \"Reading Room Chair\",\n    place: \"Copenhagen\",\n    year: \"2025\",\n    note: \"A steel-framed side chair in ash and orange leather, drawn for a teal reading room.\",\n  },\n  {\n    src: photo(\"1522161135122-3ab7ef2e63b2\"),\n    alt: \"A pink and white tower with blue-glazed windows rising into a cobalt sky\",\n    title: \"Pink Tower\",\n    place: \"Miami\",\n    year: \"2024\",\n    note: \"Twelve floors of pink render and blue glass, stepped back at the top.\",\n  },\n];\n\nconst pad = (n: number) => String(n).padStart(2, \"0\");\n\nexport function NautilusDemo() {\n  const [index, setIndex] = React.useState(0);\n  const [paused, setPaused] = React.useState(false);\n  const captionRef = React.useRef<HTMLDivElement>(null);\n  const project = WORK[index];\n  const count = WORK.length;\n\n  // The caption rises in with each new front card.\n  React.useEffect(() => {\n    captionRef.current?.animate(\n      [\n        { opacity: 0, transform: \"translateY(6px)\" },\n        { opacity: 1, transform: \"none\" },\n      ],\n      { duration: 320, easing: \"cubic-bezier(0.22, 1, 0.36, 1)\" },\n    );\n  }, [index]);\n\n  return (\n    <section className=\"@container/work w-full overflow-hidden rounded-2xl border border-zinc-200 bg-white text-zinc-950 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50\">\n      <div className=\"grid grid-cols-1 @[44rem]/work:grid-cols-[17rem_minmax(0,1fr)]\">\n        <div className=\"order-2 flex flex-col justify-between gap-8 border-t border-zinc-200 p-6 @[44rem]/work:order-1 @[44rem]/work:border-t-0 @[44rem]/work:border-r @[44rem]/work:p-8 dark:border-zinc-800\">\n          <div>\n            <p className=\"text-xs font-medium tracking-[0.14em] text-zinc-500 uppercase dark:text-zinc-400\">\n              Studio Vell\n            </p>\n            <h3 className=\"mt-3 text-[1.75rem] leading-[1.1] font-semibold tracking-[-0.03em] text-balance\">\n              Rooms, chairs, light.\n            </h3>\n          </div>\n\n          <div ref={captionRef}>\n            <p className=\"font-mono text-xs text-zinc-500 tabular-nums dark:text-zinc-400\">\n              <span className=\"text-[#007f43] dark:text-[#34d399]\">{pad(index + 1)}</span> / {pad(count)}\n            </p>\n            <p className=\"mt-2 text-lg font-semibold tracking-[-0.02em]\">{project.title}</p>\n            <p className=\"text-sm text-zinc-500 dark:text-zinc-400\">\n              {project.place} · {project.year}\n            </p>\n            <p className=\"mt-3 text-sm leading-relaxed text-zinc-600 dark:text-zinc-300\">{project.note}</p>\n          </div>\n\n          <div className=\"flex items-center gap-2\">\n            <button\n              type=\"button\"\n              aria-label=\"Previous project\"\n              onClick={() => setIndex((i) => (i - 1 + count) % count)}\n              className=\"grid size-10 place-items-center rounded-full border border-zinc-200 transition-colors hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 dark:border-zinc-800 dark:hover:bg-zinc-900 dark:focus-visible:outline-white\"\n            >\n              <svg viewBox=\"0 0 16 16\" className=\"size-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" aria-hidden>\n                <path d=\"M10 3.5 5.5 8l4.5 4.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </button>\n            <button\n              type=\"button\"\n              aria-label=\"Next project\"\n              onClick={() => setIndex((i) => (i + 1) % count)}\n              className=\"grid size-10 place-items-center rounded-full border border-zinc-200 transition-colors hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 dark:border-zinc-800 dark:hover:bg-zinc-900 dark:focus-visible:outline-white\"\n            >\n              <svg viewBox=\"0 0 16 16\" className=\"size-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" aria-hidden>\n                <path d=\"M6 3.5 10.5 8 6 12.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </button>\n            <button\n              type=\"button\"\n              aria-label={paused ? \"Play the slideshow\" : \"Pause the slideshow\"}\n              aria-pressed={paused}\n              onClick={() => setPaused((p) => !p)}\n              className=\"grid size-10 place-items-center rounded-full text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 dark:text-zinc-400 dark:hover:bg-zinc-900 dark:hover:text-white dark:focus-visible:outline-white\"\n            >\n              {paused ? (\n                <svg viewBox=\"0 0 16 16\" className=\"size-4\" fill=\"currentColor\" aria-hidden>\n                  <path d=\"M5 3.2v9.6a.5.5 0 0 0 .77.42l7.2-4.8a.5.5 0 0 0 0-.84l-7.2-4.8A.5.5 0 0 0 5 3.2Z\" />\n                </svg>\n              ) : (\n                <svg viewBox=\"0 0 16 16\" className=\"size-4\" fill=\"currentColor\" aria-hidden>\n                  <rect x=\"4\" y=\"3\" width=\"2.6\" height=\"10\" rx=\"0.8\" />\n                  <rect x=\"9.4\" y=\"3\" width=\"2.6\" height=\"10\" rx=\"0.8\" />\n                </svg>\n              )}\n            </button>\n            <a\n              href=\"https://vell.example/work\"\n              className=\"ml-auto text-sm font-medium underline decoration-zinc-300 underline-offset-4 transition-colors hover:decoration-current focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 dark:decoration-zinc-700 dark:focus-visible:outline-white\"\n            >\n              All work\n            </a>\n          </div>\n        </div>\n\n        <Nautilus\n          items={WORK}\n          index={index}\n          onIndexChange={setIndex}\n          paused={paused}\n          label=\"Studio Vell selected work\"\n          className=\"order-1 h-[22rem] @[44rem]/work:order-2 @[44rem]/work:h-[32rem]\"\n        />\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}