{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"cta-banner","type":"registry:block","title":"CTA banner","description":"The simplest ask: one banner with a gradient hairline around a soft tint, the promise on one side and two actions on the other.","dependencies":["lucide-react"],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/button.json"],"files":[{"path":"registry/dashral/blocks/cta-banner.tsx","type":"registry:file","target":"components/dashral/blocks/cta-banner.tsx","content":"import { ArrowRight, Sparkles } from \"lucide-react\"\nimport { Button } from \"../button\"\n\n/** A button: a link with href, or your handler with onClick. */\nexport type BlockAction = { label: string; href?: string; onClick?: () => void }\n\nexport type CtaBannerProps = {\n  eyebrow?: React.ReactNode\n  title?: React.ReactNode\n  description?: React.ReactNode\n  primary?: BlockAction\n  /** The second button; null hides it. */\n  secondary?: BlockAction | null\n}\n\n/**\n * The simplest call to action: one banner, the ask on one side and the actions on the other. A gradient hairline\n * around a soft tint of the same colors, so it stands out from the page without shouting. On phones the two stack,\n * the main action first. Every part comes from props.\n */\nexport function CtaBanner({\n  eyebrow = \"Free for small teams\",\n  title = \"Ready to see your numbers in one place?\",\n  description = \"Start free in a minute. No credit card, and your whole team is invited.\",\n  primary = { label: \"Start for free\", href: \"#\" },\n  secondary = { label: \"Talk to sales\", href: \"#\" },\n}: CtaBannerProps) {\n  return (\n    <section className=\"bg-background p-4 sm:p-6\">\n      <div\n        className={`relative isolate mx-auto flex max-w-6xl flex-col gap-6 overflow-hidden rounded-2xl border border-transparent px-6 py-8 sm:px-10 sm:py-10 md:flex-row md:items-center md:justify-between [background:linear-gradient(120deg,color-mix(in_oklab,var(--gradient-from)_18%,var(--card)),color-mix(in_oklab,var(--gradient-via)_10%,var(--card))_55%,color-mix(in_oklab,var(--gradient-to)_18%,var(--card)))_padding-box,linear-gradient(90deg,var(--gradient-from),var(--gradient-via),var(--gradient-to))_border-box]`}\n      >\n        {/* A glow in the middle color from one corner and a fine grid fading out, both decoration. */}\n        <div aria-hidden className=\"absolute -top-28 -right-20 -z-10 size-80 rounded-full bg-(--gradient-via)/20 blur-3xl rtl:right-auto rtl:-left-20\" />\n        <div\n          aria-hidden\n          className=\"absolute inset-0 -z-10 [background-image:linear-gradient(to_right,var(--gradient-via)_1px,transparent_1px),linear-gradient(to_bottom,var(--gradient-via)_1px,transparent_1px)] [background-size:32px_32px] opacity-[0.08] [mask-image:linear-gradient(to_left,black,transparent_65%)] rtl:[mask-image:linear-gradient(to_right,black,transparent_65%)]\"\n        />\n\n        <div className=\"max-w-xl\">\n          {eyebrow && (\n            <p className=\"flex items-center gap-1.5 text-sm font-medium text-(--gradient-ink)\">\n              <Sparkles aria-hidden className=\"size-4\" />\n              {eyebrow}\n            </p>\n          )}\n          <h2 className=\"mt-2 text-2xl font-semibold tracking-tight text-balance sm:text-3xl\">{title}</h2>\n          {description && <p className=\"mt-2 text-pretty text-muted-foreground\">{description}</p>}\n        </div>\n\n        {/* Side by side, on a phone too; the second wraps under only when the two can't fit one line. */}\n        <div className=\"flex shrink-0 flex-wrap gap-3\">\n          <Action action={primary} className=\"group flex-auto sm:flex-none\">\n            {primary.label}\n            <ArrowRight\n              aria-hidden\n              className=\"transition-transform duration-(--duration-fast) group-hover:translate-x-0.5 rtl:-scale-x-100 rtl:group-hover:-translate-x-0.5\"\n            />\n          </Action>\n          {secondary && (\n            <Action action={secondary} variant=\"outline\" className=\"flex-auto sm:flex-none\">\n              {secondary.label}\n            </Action>\n          )}\n        </div>\n      </div>\n    </section>\n  )\n}\n\n/** A large button that follows its action: a link, or a handler. */\nfunction Action({ action, variant, className, children }: { action: BlockAction; variant?: \"outline\"; className?: string; children: React.ReactNode }) {\n  return action.href ? (\n    <Button size=\"lg\" variant={variant} className={className} asChild>\n      <a href={action.href}>{children}</a>\n    </Button>\n  ) : (\n    <Button size=\"lg\" variant={variant} className={className} onClick={action.onClick}>\n      {children}\n    </Button>\n  )\n}\n"}],"cssVars":{"theme":{"ease-standard":"var(--ease-standard)","ease-enter":"var(--ease-enter)","ease-exit":"var(--ease-exit)","ease-spring":"var(--ease-spring)"},"light":{"duration-fast":"160ms","duration-standard":"240ms","duration-considered":"480ms","ease-standard":"cubic-bezier(0.2, 0, 0, 1)","ease-enter":"cubic-bezier(0, 0, 0, 1)","ease-exit":"cubic-bezier(0.3, 0, 1, 1)","ease-spring":"linear(0, 0.071 4%, 0.234 8%, 0.433 12%, 0.626 17%, 0.791 21%, 0.917 25%, 1.004 29%, 1.055 33%, 1.079 38%, 1.083 42%, 1.075 46%, 1.06 50%, 1.043 54%, 1.027 58%, 1.015 62%, 1.005 67%, 0.998 71%, 0.995 75%, 0.993 79%, 0.993 83%, 0.994 88%, 0.995 92%, 0.997 96%, 1)"},"dark":{}}}