{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stretch-index-episodes-demo",
  "type": "registry:block",
  "title": "Stretch Index: Podcast Episodes",
  "description": "Hover Accordion List example, Podcast Episodes: A podcast's latest episodes on a dark panel, with square covers through `imageAspect={1}` and episode numbers through `number`. With `collapseOnLeave`, the list folds shut when the pointer leaves it. A take on the hover list (list hover) and accordion (collapsible). Fits testimonials, team, careers, portfolio and blog sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "testimonials",
    "team",
    "careers",
    "portfolio",
    "blog",
    "hover-list",
    "accordion",
    "image-reveal",
    "list",
    "hover",
    "layout"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/stretch-index#stretch-index-episodes-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/stretch-index.json"
  ],
  "files": [
    {
      "path": "components/stretch-index-episodes-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { StretchIndex, StretchIndexItem } from \"@/components/ui/stretch-index\";\n\nconst episodes = [\n  {\n    number: \"24\",\n    title: \"Springs, and why nothing should stop dead\",\n    guest: \"Ana Ruiz, motion lead at Tessel\",\n    text: \"Why a spring that settles beats a curve that ends, and the three numbers Ana tunes first.\",\n    length: \"52 min\",\n    photo: \"1617791160505-6f00504e3519\",\n    accent: \"#8b7cf6\",\n  },\n  {\n    number: \"23\",\n    title: \"Designing the empty state\",\n    guest: \"Kofi Mensah, product designer at Tally\",\n    text: \"The first screen most people see is the one with nothing on it. How to make it teach, not apologize.\",\n    length: \"41 min\",\n    photo: \"1634017839464-5c339ebe3cb4\",\n    accent: \"#3b82f6\",\n  },\n  {\n    number: \"22\",\n    title: \"Type that moves\",\n    guest: \"Lena Hart, type designer\",\n    text: \"Variable fonts, kinetic headlines, and when animating letters helps reading instead of hurting it.\",\n    length: \"47 min\",\n    photo: \"1620641788421-7a1c342ea42e\",\n    accent: \"#ec4899\",\n  },\n  {\n    number: \"21\",\n    title: \"The case for fewer animations\",\n    guest: \"Sam Okoro, design director at Quill\",\n    text: \"Sam cut 60% of his app's transitions and support tickets went down. What stayed, and why.\",\n    length: \"38 min\",\n    photo: \"1579546929518-9e396f3cc809\",\n    accent: \"#f59e0b\",\n  },\n  {\n    number: \"20\",\n    title: \"Prototyping in the browser\",\n    guest: \"Mira Chen, design engineer at Parcel\",\n    text: \"Skipping the mockup and sketching straight in code: what you gain, and the habits that keep it fast.\",\n    length: \"55 min\",\n    photo: \"1604076913837-52ab5629fba9\",\n    accent: \"#ef4444\",\n  },\n];\n\nconst photo = (id: string) =>\n  `https://images.unsplash.com/photo-${id}?auto=format&fit=crop&w=320&h=320&q=80`;\n\nexport function StretchIndexEpisodesDemo() {\n  const [playing, setPlaying] = React.useState<string | null>(null);\n\n  return (\n    <section className=\"w-full max-w-3xl rounded-3xl bg-zinc-950 p-5 text-zinc-100 ring-1 ring-white/10 sm:p-8\">\n      <div className=\"mb-6 flex items-end justify-between gap-4\">\n        <div>\n          <p className=\"font-mono text-xs tracking-widest text-zinc-400 uppercase\">Frame Rate</p>\n          <h3 className=\"mt-2 text-2xl font-semibold tracking-tight\">Latest episodes</h3>\n        </div>\n        <p className=\"font-mono text-xs text-zinc-400\">Every other Tuesday</p>\n      </div>\n\n      <StretchIndex\n        collapseOnLeave\n        imageAspect={1}\n        imageWidth=\"clamp(4.5rem, 18cqi, 8.5rem)\"\n        className=\"border-t border-current/10\"\n      >\n        {episodes.map((episode) => {\n          const isPlaying = playing === episode.number;\n          return (\n            <StretchIndexItem\n              key={episode.number}\n              number={episode.number}\n              title={episode.title}\n              meta={episode.length}\n              image={photo(episode.photo)}\n              accent={episode.accent}\n            >\n              <p className=\"text-sm text-zinc-400\">With {episode.guest}</p>\n              <p className=\"mt-1 max-w-md text-pretty text-zinc-300\">{episode.text}</p>\n              <button\n                type=\"button\"\n                aria-pressed={isPlaying}\n                onClick={() => setPlaying(isPlaying ? null : episode.number)}\n                className=\"mt-3 inline-flex h-8 items-center gap-2 rounded-full bg-white/10 pr-3.5 pl-2 text-sm font-medium text-white outline-none hover:bg-white/15 focus-visible:ring-2 focus-visible:ring-white/70\"\n              >\n                <span\n                  aria-hidden\n                  className=\"grid size-5 place-items-center rounded-full\"\n                  style={{ backgroundColor: episode.accent }}\n                >\n                  {isPlaying ? (\n                    <svg viewBox=\"0 0 10 10\" className=\"size-2.5 fill-white\">\n                      <rect x=\"1.5\" y=\"1\" width=\"2.5\" height=\"8\" rx=\"0.6\" />\n                      <rect x=\"6\" y=\"1\" width=\"2.5\" height=\"8\" rx=\"0.6\" />\n                    </svg>\n                  ) : (\n                    <svg viewBox=\"0 0 10 10\" className=\"ml-px size-2.5 fill-white\">\n                      <path d=\"M2 1.2v7.6a.6.6 0 0 0 .9.5l6.2-3.8a.6.6 0 0 0 0-1L2.9.7a.6.6 0 0 0-.9.5Z\" />\n                    </svg>\n                  )}\n                </span>\n                {isPlaying ? \"Pause\" : \"Play episode\"}\n              </button>\n            </StretchIndexItem>\n          );\n        })}\n      </StretchIndex>\n    </section>\n  );\n}\n"
    }
  ]
}