{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sticky-product-cta",
  "title": "Sticky Product CTA",
  "author": "STARCK",
  "description": "A compact scroll-aware product action bar.",
  "files": [
    {
      "path": "registry/default/sticky-product-cta.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\ntype StickyProductCtaProps = {\n  title: string\n  description?: string\n  icon?: React.ReactNode\n  primaryAction: React.ReactNode\n  secondaryAction?: React.ReactNode\n  showAfter?: number\n  contained?: boolean\n  className?: string\n}\n\nfunction StickyProductCta({\n  title,\n  description,\n  icon,\n  primaryAction,\n  secondaryAction,\n  showAfter = 600,\n  contained = false,\n  className = \"\",\n}: StickyProductCtaProps) {\n  const [visible, setVisible] = React.useState(showAfter <= 0)\n\n  React.useEffect(() => {\n    const update = () => setVisible(window.scrollY >= showAfter)\n    update()\n    window.addEventListener(\"scroll\", update, { passive: true })\n    return () => window.removeEventListener(\"scroll\", update)\n  }, [showAfter])\n\n  return (\n    <div\n      aria-hidden={!visible}\n      className={`${contained ? \"absolute\" : \"fixed\"} inset-x-0 bottom-0 z-40 transition-transform duration-300 ${visible ? \"translate-y-0\" : \"translate-y-full\"} ${className}`}\n    >\n      <div className=\"border-t border-black/8 bg-white/88 shadow-[0_-12px_40px_-24px_rgba(0,0,0,0.3)] backdrop-blur-xl\">\n        <div className=\"mx-auto flex max-w-5xl items-center gap-3 px-4 py-3 sm:gap-4\">\n          {icon ? (\n            <div className=\"grid size-9 shrink-0 place-items-center overflow-hidden rounded-xl bg-zinc-950 text-white\">\n              {icon}\n            </div>\n          ) : null}\n          <div className=\"min-w-0 flex-1\">\n            <p className=\"truncate text-sm font-semibold text-zinc-950\">\n              {title}\n            </p>\n            {description ? (\n              <p className=\"mt-0.5 hidden truncate text-xs text-zinc-500 sm:block\">\n                {description}\n              </p>\n            ) : null}\n          </div>\n          {secondaryAction ? (\n            <div className=\"hidden shrink-0 sm:block\">{secondaryAction}</div>\n          ) : null}\n          <div className=\"shrink-0\">{primaryAction}</div>\n        </div>\n      </div>\n    </div>\n  )\n}\n\nexport { StickyProductCta }\nexport type { StickyProductCtaProps }\n",
      "type": "registry:component",
      "target": "components/sticky-product-cta.tsx"
    }
  ],
  "type": "registry:component"
}