{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "portfolio-13",
  "type": "registry:block",
  "description": "Before/after redesign comparison with a draggable divider over two UI mockups and result metrics.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/portfolio/portfolio-13.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { MoveHorizontal } from \"@designali/icons\"\n\nconst changes = [\n  { label: \"Steps to book\", before: \"7\", after: \"3\" },\n  { label: \"Time on task\", before: \"4m 12s\", after: \"1m 05s\" },\n  { label: \"Booking completion\", before: \"38%\", after: \"71%\" },\n]\n\nfunction Screen({ variant }: { variant: \"before\" | \"after\" }) {\n  return (\n    <img\n      src={\n        variant === \"before\"\n          ? \"/images/templates/dalim-old.jpg\"\n          : \"/images/templates/resort.jpg\"\n      }\n      alt={\n        variant === \"before\"\n          ? \"Booking page before the Designali redesign\"\n          : \"Designali Resort template booking page\"\n      }\n      draggable={false}\n      className=\"absolute inset-0 size-full object-cover object-top\"\n    />\n  )\n}\n\nexport default function Portfolio13() {\n  const [position, setPosition] = useState(50)\n\n  return (\n    <section className=\"w-full bg-background py-16 text-foreground md:py-24\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"grid gap-6 md:grid-cols-[1fr_auto] md:items-end\">\n          <div>\n            <p className=\"text-xs tracking-widest text-muted-foreground uppercase\">\n              Redesign · Designali Resort template\n            </p>\n            <h2 className=\"mt-3 max-w-2xl text-3xl font-medium tracking-tight md:text-5xl\">\n              From a wall of options to a booking you can finish on the go\n            </h2>\n          </div>\n          <p className=\"text-xs text-muted-foreground\">Drag to compare</p>\n        </div>\n\n        <div className=\"relative mt-10 aspect-[4/3] w-full overflow-hidden border border-border select-none md:aspect-[16/8]\">\n          <Screen variant=\"after\" />\n          <div\n            className=\"absolute inset-0\"\n            style={{ clipPath: `inset(0 ${100 - position}% 0 0)` }}\n          >\n            <Screen variant=\"before\" />\n          </div>\n          <span className=\"absolute top-4 left-4 bg-background/90 px-2 py-1 text-xs\">\n            Before\n          </span>\n          <span className=\"absolute top-4 right-4 bg-background/90 px-2 py-1 text-xs\">\n            After\n          </span>\n          <div\n            className=\"pointer-events-none absolute inset-y-0 w-px bg-foreground\"\n            style={{ left: `${position}%` }}\n          >\n            <span className=\"absolute top-1/2 left-1/2 flex size-10 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-border bg-background shadow-lg\">\n              <MoveHorizontal className=\"size-4\" />\n            </span>\n          </div>\n          <input\n            type=\"range\"\n            min={0}\n            max={100}\n            value={position}\n            onChange={(e) => setPosition(Number(e.target.value))}\n            aria-label=\"Compare before and after\"\n            className=\"absolute inset-0 h-full w-full cursor-ew-resize opacity-0\"\n          />\n        </div>\n\n        <dl className=\"mt-6 grid gap-px border border-border bg-border sm:grid-cols-3\">\n          {changes.map((c) => (\n            <div key={c.label} className=\"bg-background p-5\">\n              <dt className=\"text-xs text-muted-foreground\">{c.label}</dt>\n              <dd className=\"mt-2 flex items-baseline gap-3\">\n                <span className=\"text-sm text-muted-foreground line-through\">\n                  {c.before}\n                </span>\n                <span className=\"text-2xl font-semibold tracking-tight\">\n                  {c.after}\n                </span>\n              </dd>\n            </div>\n          ))}\n        </dl>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "900px"
  },
  "categories": [
    "portfolio"
  ]
}