{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "slice-gallery-hero-demo",
  "type": "registry:block",
  "title": "Slice Gallery: Hero",
  "description": "Image Accordion example, Hero: A travel hero that plays on its own: the open slice's strip fills like a story timer, then the next place opens. Hovering pauses it. The counter above follows along through `index` and `onIndexChange`. A take on the accordion (collapsible) and image gallery (photo gallery). Fits portfolio, team and hero sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "portfolio",
    "team",
    "hero",
    "accordion",
    "image-gallery",
    "carousel",
    "image-reveal",
    "gallery",
    "hover",
    "layout"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/slice-gallery#slice-gallery-hero-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/slice-gallery.json"
  ],
  "files": [
    {
      "path": "components/slice-gallery-hero-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { SliceGallery, SliceGalleryItem } from \"@/components/ui/slice-gallery\";\n\nconst stays = [\n  {\n    place: \"Kyoto\",\n    country: \"Japan\",\n    nights: 6,\n    price: \"€1,480\",\n    note: \"A machiya on a lane behind Yasaka, breakfast in the garden.\",\n    photo: \"1493976040374-85c8e12f0c0e\",\n    accent: \"#f6b38e\",\n  },\n  {\n    place: \"Banff\",\n    country: \"Canada\",\n    nights: 5,\n    price: \"€1,320\",\n    note: \"A lake cabin with canoes at the dock and no signal at all.\",\n    photo: \"1493246507139-91e8fad9978e\",\n    accent: \"#8fd3e6\",\n  },\n  {\n    place: \"Vík\",\n    country: \"Iceland\",\n    nights: 4,\n    price: \"€1,150\",\n    note: \"Black sand, a grey sea and a turf-roofed guesthouse above it.\",\n    photo: \"1500043357865-c6b8827edf10\",\n    accent: \"#d3dbe2\",\n  },\n  {\n    place: \"Lisbon\",\n    country: \"Portugal\",\n    nights: 4,\n    price: \"€890\",\n    note: \"Tiled rooms in Alfama, a short tram ride from the river.\",\n    photo: \"1536663815808-535e2280d2c2\",\n    accent: \"#ffcf8a\",\n  },\n  {\n    place: \"Big Sur\",\n    country: \"USA\",\n    nights: 5,\n    price: \"€1,690\",\n    note: \"Redwoods above the cove and the Pacific under the deck.\",\n    photo: \"1510414842594-a61c69b5ae57\",\n    accent: \"#8fe0c9\",\n  },\n];\n\nconst photo = (id: string) =>\n  `https://images.unsplash.com/photo-${id}?auto=format&fit=crop&w=1100&h=1000&q=80`;\n\nconst pad = (n: number) => String(n).padStart(2, \"0\");\n\nexport function SliceGalleryHeroDemo() {\n  const [index, setIndex] = React.useState(0);\n  const stay = stays[index];\n\n  return (\n    <section className=\"w-full max-w-5xl\">\n      <div className=\"mb-8 grid gap-6 sm:grid-cols-[1fr_auto] sm:items-end\">\n        <div>\n          <p className=\"font-mono text-xs tracking-widest text-zinc-500 uppercase\">\n            Small stays, slow trips\n          </p>\n          <h2 className=\"mt-3 text-4xl font-semibold tracking-tight text-balance text-zinc-900 sm:text-5xl dark:text-zinc-50\">\n            Go somewhere quiet.\n          </h2>\n          <p className=\"mt-3 max-w-md text-pretty text-zinc-600 dark:text-zinc-400\">\n            Five places we keep going back to, each with one house we&apos;d book again.\n          </p>\n        </div>\n        <div className=\"flex items-center gap-5\">\n          <p aria-live=\"polite\" className=\"font-mono text-xs text-zinc-500 tabular-nums\">\n            {pad(index + 1)} / {pad(stays.length)}\n            <span className=\"ml-2 text-zinc-900 dark:text-zinc-100\">{stay.place}</span>\n          </p>\n          <a\n            href=\"#plan\"\n            className=\"rounded-full bg-zinc-900 px-5 py-2.5 text-sm font-medium text-white transition-colors outline-none hover:bg-zinc-700 focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-300 dark:focus-visible:ring-offset-zinc-950\"\n          >\n            Plan a trip\n          </a>\n        </div>\n      </div>\n\n      <SliceGallery\n        index={index}\n        onIndexChange={setIndex}\n        autoPlay={5000}\n        className=\"h-[34rem] sm:h-[30rem]\"\n      >\n        {stays.map((item) => (\n          <SliceGalleryItem\n            key={item.place}\n            title={item.place}\n            label={item.country}\n            image={photo(item.photo)}\n            accent={item.accent}\n          >\n            <p className=\"max-w-xs text-[15px] leading-snug text-pretty text-white/90\">{item.note}</p>\n            <p className=\"mt-3 flex items-baseline gap-2 text-sm text-white/70\">\n              <span>{item.nights} nights from</span>\n              <span className=\"text-lg font-medium text-white\">{item.price}</span>\n            </p>\n          </SliceGalleryItem>\n        ))}\n      </SliceGallery>\n    </section>\n  );\n}\n"
    }
  ]
}