{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "image-accordion-vertical",
  "type": "registry:component",
  "title": "Image Accordion Vertical",
  "description": "Stacked bands that open like an aperture: the image stays fixed while the band grows from its center, so more of the scene is revealed rather than scaled. Each open band shows a description and a project link.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "components",
    "accordion",
    "vertical",
    "gallery",
    "architecture",
    "portfolio",
    "aperture"
  ],
  "docs": "https://hyperblur.dev/effects/image-accordion-vertical",
  "files": [
    {
      "path": "registry/hyperblur/image-accordion-vertical.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/image-accordion-vertical.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface VerticalPanel {\n  title: string;\n  meta: string;\n  description: string;\n  colors?: [string, string, string];\n  motif?: \"arches\" | \"columns\" | \"stairs\" | \"window\";\n  href?: string;\n}\n\nexport interface ImageAccordionVerticalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n  items?: VerticalPanel[];\n  value?: number;\n  defaultValue?: number;\n  onChange?: (index: number) => void;\n  openOn?: \"hover\" | \"click\";\n  height?: number;\n  accent?: string;\n}\n\nconst defaultItems: VerticalPanel[] = [\n  {\n    title: \"Casa Arco\",\n    meta: \"Lisbon / 2026\",\n    description: \"A row house opened up with five plaster arches and a lime-washed courtyard.\",\n    colors: [\"#e9d8c4\", \"#c98f6a\", \"#5b3626\"],\n    motif: \"arches\",\n  },\n  {\n    title: \"Pavilion Nine\",\n    meta: \"Oslo / 2025\",\n    description: \"Timber colonnade around a reading room, lit from above by a single slot.\",\n    colors: [\"#cfd9d6\", \"#6f8f88\", \"#1f3431\"],\n    motif: \"columns\",\n  },\n  {\n    title: \"Terrace House\",\n    meta: \"Kyoto / 2025\",\n    description: \"Stepped concrete levels follow the slope down to a moss garden.\",\n    colors: [\"#d9d4e6\", \"#8b7fb3\", \"#2b2546\"],\n    motif: \"stairs\",\n  },\n  {\n    title: \"Oculus Studio\",\n    meta: \"Mexico City / 2024\",\n    description: \"A round skylight tracks the day across a terracotta floor.\",\n    colors: [\"#f2cfa8\", \"#d0603a\", \"#4a1a10\"],\n    motif: \"window\",\n  },\n];\n\nfunction Art({ colors, motif, id }: { colors: [string, string, string]; motif: VerticalPanel[\"motif\"]; id: string }) {\n  const [light, mid, deep] = colors;\n  return (\n    <svg viewBox=\"0 0 600 300\" preserveAspectRatio=\"xMidYMid slice\" aria-hidden=\"true\">\n      <defs>\n        <linearGradient id={`${id}-w`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor={light} />\n          <stop offset=\"1\" stopColor={mid} />\n        </linearGradient>\n        <linearGradient id={`${id}-r`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"#ffffff\" stopOpacity=\"0.55\" />\n          <stop offset=\"1\" stopColor=\"#ffffff\" stopOpacity=\"0\" />\n        </linearGradient>\n      </defs>\n      <rect width=\"600\" height=\"300\" fill={`url(#${id}-w)`} />\n      {motif === \"arches\" &&\n        [0, 1, 2, 3, 4].map((i) => {\n          const x = 40 + i * 110;\n          return (\n            <g key={i}>\n              <path d={`M${x} 300 L${x} 150 A45 45 0 0 1 ${x + 90} 150 L${x + 90} 300 Z`} fill={deep} opacity={0.85 - i * 0.08} />\n              <path d={`M${x + 12} 300 L${x + 12} 156 A33 33 0 0 1 ${x + 78} 156 L${x + 78} 300 Z`} fill={mid} opacity=\"0.55\" />\n            </g>\n          );\n        })}\n      {motif === \"columns\" &&\n        [0, 1, 2, 3, 4, 5, 6].map((i) => (\n          <g key={i}>\n            <rect x={30 + i * 82} y=\"60\" width=\"26\" height=\"240\" fill={deep} opacity={0.9 - i * 0.06} />\n            <rect x={30 + i * 82} y=\"60\" width=\"8\" height=\"240\" fill={light} opacity=\"0.25\" />\n          </g>\n        ))}\n      {motif === \"columns\" && <rect x=\"0\" y=\"40\" width=\"600\" height=\"22\" fill={deep} />}\n      {motif === \"stairs\" &&\n        [0, 1, 2, 3, 4, 5].map((i) => (\n          <g key={i}>\n            <rect x={i * 100} y={120 + i * 30} width=\"600\" height=\"200\" fill={deep} opacity={0.35 + i * 0.1} />\n            <rect x={i * 100} y={120 + i * 30} width=\"600\" height=\"4\" fill={light} opacity=\"0.5\" />\n          </g>\n        ))}\n      {motif === \"window\" && (\n        <g>\n          <rect x=\"0\" y=\"210\" width=\"600\" height=\"90\" fill={deep} opacity=\"0.75\" />\n          <circle cx=\"300\" cy=\"110\" r=\"78\" fill={deep} />\n          <circle cx=\"300\" cy=\"110\" r=\"62\" fill={light} />\n          <ellipse cx=\"330\" cy=\"248\" rx=\"120\" ry=\"22\" fill={light} opacity=\"0.45\" />\n        </g>\n      )}\n      <path d=\"M380 0 L520 0 L260 300 L120 300 Z\" fill={`url(#${id}-r)`} opacity=\"0.35\" />\n    </svg>\n  );\n}\n\nconst css = `\n.hb-vl2 {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  width: 100%;\n  height: var(--hb-vl2-h);\n  color: #ededed;\n  font-family: inherit;\n  box-sizing: border-box;\n}\n.hb-vl2 *, .hb-vl2 *::before, .hb-vl2 *::after { box-sizing: border-box; }\n.hb-vl2-b {\n  position: relative;\n  flex: 1 1 0;\n  min-height: 36px;\n  overflow: hidden;\n  border-radius: 14px;\n  background: #121212;\n  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);\n  transition: flex-grow 0.8s cubic-bezier(0.76, 0, 0.24, 1), box-shadow 0.4s ease;\n}\n.hb-vl2-b[data-active=\"true\"] { flex-grow: 6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 40px -24px rgba(0, 0, 0, 0.9); }\n.hb-vl2-art {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 50%;\n  height: var(--hb-vl2-h);\n  transform: translateY(-50%) scale(1.06);\n  filter: saturate(0.4) brightness(0.55);\n  transition: filter 0.8s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);\n}\n.hb-vl2-art svg { display: block; width: 100%; height: 100%; }\n.hb-vl2-b[data-active=\"true\"] .hb-vl2-art { filter: none; transform: translateY(-50%); }\n.hb-vl2-veil {\n  position: absolute;\n  inset: 0;\n  background: linear-gradient(90deg, rgba(8, 8, 10, 0.88) 0%, rgba(8, 8, 10, 0.5) 45%, rgba(8, 8, 10, 0.1) 100%);\n  pointer-events: none;\n}\n.hb-vl2-head {\n  position: absolute;\n  inset: 0 0 auto 0;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  width: 100%;\n  height: 36px;\n  margin: 0;\n  padding: 0 14px;\n  border: 0;\n  background: transparent;\n  color: inherit;\n  font: inherit;\n  text-align: left;\n  cursor: pointer;\n  border-radius: 14px;\n}\n.hb-vl2-head:focus-visible { outline: 2px solid var(--hb-vl2-a); outline-offset: -2px; }\n.hb-vl2-idx {\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 10px;\n  color: rgba(255, 255, 255, 0.5);\n  letter-spacing: 0.06em;\n}\n.hb-vl2-title {\n  flex: 1 1 auto;\n  min-width: 0;\n  overflow: hidden;\n  font-size: 14px;\n  font-weight: 600;\n  letter-spacing: -0.01em;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.hb-vl2-meta {\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 10px;\n  letter-spacing: 0.08em;\n  text-transform: uppercase;\n  color: rgba(255, 255, 255, 0.6);\n  white-space: nowrap;\n}\n.hb-vl2-plus {\n  position: relative;\n  flex: none;\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);\n  transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.3s ease;\n}\n.hb-vl2-plus::before, .hb-vl2-plus::after {\n  content: \"\";\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: 8px;\n  height: 1.5px;\n  border-radius: 1px;\n  background: currentColor;\n  transform: translate(-50%, -50%);\n}\n.hb-vl2-plus::after { transform: translate(-50%, -50%) rotate(90deg); }\n.hb-vl2-b[data-active=\"true\"] .hb-vl2-plus { transform: rotate(135deg); background: var(--hb-vl2-a); box-shadow: none; }\n.hb-vl2-body {\n  position: absolute;\n  left: 14px;\n  right: 14px;\n  bottom: 12px;\n  display: flex;\n  align-items: flex-end;\n  justify-content: space-between;\n  gap: 12px;\n  opacity: 0;\n  transform: translateY(10px);\n  transition: opacity 0.25s ease, transform 0.3s ease;\n  pointer-events: none;\n}\n.hb-vl2-b[data-active=\"true\"] .hb-vl2-body {\n  opacity: 1;\n  transform: none;\n  pointer-events: auto;\n  transition: opacity 0.5s ease 0.35s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;\n}\n.hb-vl2-desc {\n  margin: 0;\n  max-width: 36ch;\n  font-size: 12.5px;\n  line-height: 1.45;\n  color: rgba(255, 255, 255, 0.82);\n}\n.hb-vl2-link {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  gap: 6px;\n  padding: 6px 10px 6px 12px;\n  border-radius: 999px;\n  background: rgba(255, 255, 255, 0.92);\n  color: #0a0a0a;\n  font-size: 11.5px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: gap 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;\n}\n.hb-vl2-link:hover { gap: 10px; background: #ffffff; }\n.hb-vl2-link:focus-visible { outline: 2px solid var(--hb-vl2-a); outline-offset: 2px; }\n@container (max-width: 360px) {\n  .hb-vl2-desc { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vl2 *, .hb-vl2 *::before, .hb-vl2 *::after { transition: none !important; }\n}\n`;\n\nexport function ImageAccordionVertical({\n  items = defaultItems,\n  value,\n  defaultValue = 0,\n  onChange,\n  openOn = \"hover\",\n  height = 380,\n  accent = \"#2f7bff\",\n  className,\n  style,\n  ...rest\n}: ImageAccordionVerticalProps) {\n  const [inner, setInner] = React.useState(defaultValue);\n  const active = value ?? inner;\n  const uid = React.useId().replace(/:/g, \"\");\n  const heads = React.useRef<(HTMLButtonElement | null)[]>([]);\n\n  const select = (index: number) => {\n    if (index === active) return;\n    if (value === undefined) setInner(index);\n    onChange?.(index);\n  };\n\n  const onKey = (event: React.KeyboardEvent, index: number) => {\n    const n = items.length;\n    let next = -1;\n    if (event.key === \"ArrowDown\") next = (index + 1) % n;\n    else if (event.key === \"ArrowUp\") next = (index - 1 + n) % n;\n    else if (event.key === \"Home\") next = 0;\n    else if (event.key === \"End\") next = n - 1;\n    if (next < 0) return;\n    event.preventDefault();\n    heads.current[next]?.focus();\n  };\n\n  return (\n    <div\n      className={[\"hb-vl2\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-vl2-a\": accent, \"--hb-vl2-h\": `${height}px`, containerType: \"inline-size\", ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-image-accordion-vertical\" precedence=\"default\">{css}</style>\n      {items.map((item, i) => {\n        const on = i === active;\n        const bodyId = `${uid}-b${i}`;\n        return (\n          <div\n            key={item.title + i}\n            className=\"hb-vl2-b\"\n            data-active={on ? \"true\" : \"false\"}\n            onPointerEnter={openOn === \"hover\" ? () => select(i) : undefined}\n          >\n            <div className=\"hb-vl2-art\">\n              <Art colors={item.colors ?? [\"#e9d8c4\", \"#c98f6a\", \"#5b3626\"]} motif={item.motif ?? \"arches\"} id={`${uid}-a${i}`} />\n            </div>\n            <span className=\"hb-vl2-veil\" />\n            <button\n              ref={(node) => {\n                heads.current[i] = node;\n              }}\n              type=\"button\"\n              className=\"hb-vl2-head\"\n              aria-expanded={on}\n              aria-controls={bodyId}\n              onClick={() => select(i)}\n              onFocus={() => select(i)}\n              onKeyDown={(event) => onKey(event, i)}\n            >\n              <span className=\"hb-vl2-idx\">{String(i + 1).padStart(2, \"0\")}</span>\n              <span className=\"hb-vl2-title\">{item.title}</span>\n              <span className=\"hb-vl2-meta\">{item.meta}</span>\n              <span className=\"hb-vl2-plus\" aria-hidden=\"true\" />\n            </button>\n            <div className=\"hb-vl2-body\" id={bodyId} aria-hidden={!on}>\n              <p className=\"hb-vl2-desc\">{item.description}</p>\n              <a className=\"hb-vl2-link\" href={item.href ?? \"#\"} tabIndex={on ? 0 : -1}>\n                View project\n                <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\">\n                  <path d=\"M2.5 6h7M6.5 3l3 3-3 3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                </svg>\n              </a>\n            </div>\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n"
    }
  ]
}