{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "sticky-cta-bar",
  "title": "Sticky CTA Bar",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/sticky-cta-bar/StickyCtaBar.vue",
      "content": "<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { Clock, X } from 'lucide-vue-next'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Separator } from '@/components/ui/separator'\n\nconst props = withDefaults(\n  defineProps<{\n    /** Scroll distance in pixels before the bar reveals. */\n    threshold?: number\n    /** sessionStorage key holding the dismissal, so it stays closed for the session. */\n    storageKey?: string\n  }>(),\n  {\n    threshold: 480,\n    storageKey: 'uipkge:sticky-cta-dismissed',\n  },\n)\n\n// Starts hidden so server and first client render agree — the scroll handler\n// is the only thing that reveals it.\nconst visible = ref(false)\nconst dismissed = ref(false)\n\nfunction onScroll() {\n  visible.value = !dismissed.value && window.scrollY > props.threshold\n}\n\nfunction dismiss() {\n  dismissed.value = true\n  visible.value = false\n  try {\n    window.sessionStorage.setItem(props.storageKey, '1')\n  } catch {\n    // Private browsing or blocked storage: dismissing still holds for this page view.\n  }\n}\n\nonMounted(() => {\n  try {\n    dismissed.value = window.sessionStorage.getItem(props.storageKey) === '1'\n  } catch {\n    dismissed.value = false\n  }\n  onScroll()\n  window.addEventListener('scroll', onScroll, { passive: true })\n})\n\nonBeforeUnmount(() => window.removeEventListener('scroll', onScroll))\n</script>\n\n<template>\n  <Transition\n    enter-active-class=\"transition duration-200 ease-out\"\n    enter-from-class=\"translate-y-full opacity-0\"\n    leave-active-class=\"transition duration-150 ease-in\"\n    leave-to-class=\"translate-y-full opacity-0\"\n  >\n    <div\n      v-show=\"visible\"\n      data-slot=\"sticky-cta-bar\"\n      class=\"fixed inset-x-0 bottom-0 z-50 px-4 pb-4\"\n      role=\"region\"\n      aria-label=\"Trial offer\"\n    >\n      <div\n        class=\"border-border bg-card/95 mx-auto flex max-w-4xl flex-wrap items-center gap-x-5 gap-y-3 rounded-xl border p-3 pl-4 shadow-lg backdrop-blur\"\n      >\n        <Badge variant=\"secondary\" class=\"gap-1.5\">\n          <Clock class=\"size-3\" aria-hidden=\"true\" />\n          Free for 14 days\n        </Badge>\n\n        <p class=\"min-w-0 grow text-sm\">\n          <span class=\"font-medium\">Start on the full plan.</span>\n          <span class=\"text-muted-foreground\"> No card, no sales call, cancel from the dashboard.</span>\n        </p>\n\n        <div class=\"flex items-center gap-2\">\n          <Button size=\"sm\">Start free trial</Button>\n          <Button size=\"sm\" variant=\"ghost\" class=\"hidden sm:inline-flex\">Talk to us</Button>\n          <Separator orientation=\"vertical\" class=\"hidden h-6 sm:block\" />\n          <Button size=\"icon\" variant=\"ghost\" aria-label=\"Dismiss this offer\" @click=\"dismiss\">\n            <X class=\"size-4\" aria-hidden=\"true\" />\n          </Button>\n        </div>\n      </div>\n    </div>\n  </Transition>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/StickyCtaBar.vue"
    }
  ],
  "dependencies": [
    "lucide-vue-next"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/separator.json"
  ],
  "description": "Scroll-triggered bottom CTA bar that reveals past a threshold, carrying an offer line, inline social proof, primary + ghost actions, and a dismiss control that stays dismissed for the session.",
  "categories": [
    "marketing"
  ],
  "deprecated": true,
  "replacedBy": "sticky-cta"
}