{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sticky-cta-reading-progress",
  "title": "Sticky CTA — Reading Progress",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/sticky-cta-reading-progress/StickyCtaReadingProgress.tsx",
      "content": "'use client'\n\nimport { useEffect, useRef, useState } from 'react'\nimport { ArrowRight, X } from 'lucide-react'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Progress } from '@/components/ui/progress'\nimport { Separator } from '@/components/ui/separator'\n\nexport function StickyCtaReadingProgress({ revealAt = 15 }: { revealAt?: number }) {\n  // Both start at rest so server and first client paint agree; the scroll\n  // handler is the only thing that reveals the bar or moves the progress.\n  const [progress, setProgress] = useState(0)\n  const [visible, setVisible] = useState(false)\n  const dismissed = useRef(false)\n\n  useEffect(() => {\n    const onScroll = () => {\n      const scrollable = document.documentElement.scrollHeight - window.innerHeight\n      const percent = scrollable > 0 ? Math.min(Math.round((window.scrollY / scrollable) * 100), 100) : 0\n      setProgress(percent)\n      setVisible(!dismissed.current && percent >= revealAt)\n    }\n    onScroll()\n    window.addEventListener('scroll', onScroll, { passive: true })\n    window.addEventListener('resize', onScroll)\n    return () => {\n      window.removeEventListener('scroll', onScroll)\n      window.removeEventListener('resize', onScroll)\n    }\n  }, [revealAt])\n\n  return (\n    <div\n      data-slot=\"sticky-cta-reading-progress\"\n      className={`border-border bg-card/95 fixed inset-x-0 bottom-0 z-50 border-t backdrop-blur transition duration-200 ${\n        visible ? 'translate-y-0 opacity-100' : 'pointer-events-none invisible translate-y-full opacity-0'\n      }`}\n      role=\"region\"\n      aria-label=\"Reading progress and trial offer\"\n      aria-hidden={!visible}\n    >\n      <Progress value={progress} className=\"h-0.5 rounded-none\" aria-label=\"Reading progress\" />\n\n      <div className=\"mx-auto flex max-w-5xl flex-wrap items-center gap-x-5 gap-y-2 px-6 py-3\">\n        <Badge variant=\"secondary\" className=\"shrink-0 tabular-nums\">\n          {progress}% read\n        </Badge>\n\n        <p className=\"min-w-0 grow text-sm\">\n          <span className=\"font-medium\">Finished the technical detail?</span>\n          <span className=\"text-muted-foreground\"> The trial runs on your real warehouse, read-only.</span>\n        </p>\n\n        <div className=\"flex shrink-0 items-center gap-2\">\n          <Button size=\"sm\">\n            Start free\n            <ArrowRight className=\"ml-1.5 size-3.5\" aria-hidden=\"true\" />\n          </Button>\n          <Separator orientation=\"vertical\" className=\"hidden h-5 sm:block\" />\n          <Button\n            size=\"icon\"\n            variant=\"ghost\"\n            className=\"size-7\"\n            aria-label=\"Dismiss\"\n            onClick={() => {\n              dismissed.current = true\n              setVisible(false)\n            }}\n          >\n            <X className=\"size-3.5\" aria-hidden=\"true\" />\n          </Button>\n        </div>\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/StickyCtaReadingProgress.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/progress.json",
    "https://uipkge.dev/r/react/separator.json"
  ],
  "description": "Sticky bottom bar that doubles as a reading-progress indicator, revealing partway down a long page and reporting how much of it remains.",
  "categories": [
    "marketing"
  ],
  "deprecated": true,
  "replacedBy": "sticky-cta"
}