{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sync-grid-models-demo",
  "type": "registry:block",
  "title": "Sync Grid: Model Output",
  "description": "Video Comparison Grid example, Model Output: One prompt, four fictional video models. The clips run 7 to 21 seconds and line up by percentage, so halfway is halfway in all of them. Stack them and move up and down to flip between outputs on the same frame. A take on the video (video player) and before and after (before after). Fits features sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "features",
    "video",
    "before-and-after",
    "comparison",
    "scrubbing",
    "motion"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/sync-grid#sync-grid-models-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/sync-grid.json"
  ],
  "files": [
    {
      "path": "components/sync-grid-models-demo.tsx",
      "type": "registry:component",
      "content": "import { SyncGrid, SyncGridItem } from \"@/components/ui/sync-grid\";\n\nconst prompt = \"A paper boat drifting down a rain-soaked street\";\n\n// Four clips of different lengths, lined up by percentage: halfway through\n// one is halfway through all of them.\nconst outputs = [\n  { model: \"Bramble 2\", clip: 49029, time: \"38s\", cost: \"$0.09\" },\n  { model: \"Fernlight XL\", clip: 17291, time: \"1m 12s\", cost: \"$0.31\" },\n  { model: \"Quarry\", clip: 28088, time: \"54s\", cost: \"$0.18\" },\n  { model: \"Nimbus v4\", clip: 31551, time: \"27s\", cost: \"$0.06\" },\n];\n\nconst video = (id: number) => `https://assets.mixkit.co/videos/${id}/${id}-720.mp4`;\nconst poster = (id: number) => `https://assets.mixkit.co/videos/${id}/${id}-thumb-720-0.jpg`;\n\nexport function SyncGridModelsDemo() {\n  return (\n    <div className=\"w-full max-w-3xl\">\n      <div className=\"mb-4 flex items-center gap-3 rounded-2xl border border-zinc-200 bg-white px-3 py-2.5 shadow-sm dark:border-zinc-800 dark:bg-zinc-900\">\n        <span className=\"grid size-7 shrink-0 place-items-center rounded-lg bg-zinc-950 text-white dark:bg-white dark:text-zinc-950\">\n          <SparkIcon />\n        </span>\n        <p className=\"min-w-0 flex-1 truncate text-sm text-zinc-900 dark:text-zinc-100\">{prompt}</p>\n        <span className=\"hidden shrink-0 font-mono text-[11px] text-zinc-500 sm:block\">4 outputs · 16:9</span>\n      </div>\n\n      <SyncGrid columns={2} duration={12}>\n        {outputs.map((output) => (\n          <SyncGridItem key={output.model} label={output.model} src={video(output.clip)} poster={poster(output.clip)}>\n            <div className=\"absolute top-9 left-2.5 flex gap-1\">\n              <Stat>{output.time}</Stat>\n              <Stat>{output.cost}</Stat>\n            </div>\n          </SyncGridItem>\n        ))}\n      </SyncGrid>\n    </div>\n  );\n}\n\nfunction Stat({ children }: { children: React.ReactNode }) {\n  return (\n    <span className=\"rounded-full bg-black/45 px-1.5 py-0.5 font-mono text-[10px] text-white/90 tabular-nums backdrop-blur-md\">\n      {children}\n    </span>\n  );\n}\n\nfunction SparkIcon() {\n  return (\n    <svg viewBox=\"0 0 16 16\" aria-hidden className=\"size-3.5 fill-current\">\n      <path d=\"M8 1.5c.3 2.9 1.6 4.2 4.5 4.5-2.9.3-4.2 1.6-4.5 4.5-.3-2.9-1.6-4.2-4.5-4.5 2.9-.3 4.2-1.6 4.5-4.5ZM12.5 10c.15 1.4.75 2 2 2.1-1.25.15-1.85.75-2 2.15-.15-1.4-.75-2-2.1-2.15 1.35-.1 1.95-.7 2.1-2.1Z\" />\n    </svg>\n  );\n}\n"
    }
  ]
}