{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"cta-footer","type":"registry:block","title":"CTA footer","description":"A last call to action on a soft glow with the reassurance under it, then the links and the copyright.","dependencies":["lucide-react"],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/button.json"],"files":[{"path":"registry/dashral/blocks/cta-footer.tsx","type":"registry:file","target":"components/dashral/blocks/cta-footer.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/** A link in the footer. */\nexport type FooterLink = { label: string; href: string }\n\nconst linksOf = (...labels: string[]): FooterLink[] => labels.map((label) => ({ label, href: \"#\" }))\nconst sampleColumns = [\n  { title: \"Product\", links: linksOf(\"Features\", \"Pricing\", \"Changelog\") },\n  { title: \"Company\", links: linksOf(\"About\", \"Careers\", \"Contact\") },\n  { title: \"Resources\", links: linksOf(\"Docs\", \"Blog\", \"Status\") },\n]\n\n/**\n * The end of a landing page: a last call to action on a soft glow — the promise, the main action and the reassurance\n * under it — then the brand, three columns of links and the copyright. Every part comes from props.\n */\nexport function CtaFooter({\n  title = \"Your next dashboard is an afternoon away\",\n  description = \"Connect your data, pick a template, invite the team. Everyone sees real numbers by the end of the day.\",\n  primary = { label: \"Start for free\", href: \"#\" },\n  secondary = { label: \"Book a demo\", href: \"#\" },\n  note = \"Free forever for small teams · No credit card\",\n  brand = { name: \"Acme\", href: \"#\", tagline: \"Dashboards your team actually opens.\" },\n  columns = sampleColumns,\n  copyright,\n  legal = linksOf(\"Privacy\", \"Terms\"),\n}: {\n  title?: React.ReactNode\n  description?: React.ReactNode\n  primary?: BlockAction\n  /** The second button; null hides it. */\n  secondary?: BlockAction | null\n  /** A line under the buttons; none hides it. */\n  note?: React.ReactNode\n  brand?: { name: string; href: string; tagline?: string; logo?: React.ReactNode }\n  columns?: { title: string; links: FooterLink[] }[]\n  /** The copyright line (© this year and the brand without it). */\n  copyright?: string\n  legal?: FooterLink[]\n}) {\n  const link = \"rounded-sm text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50\"\n\n  return (\n    <footer className=\"bg-background px-4 sm:px-6\">\n      {/* One column for everything, the same as the page's, so the card's edges line up with the content above. */}\n      <div className=\"mx-auto max-w-6xl pt-16\">\n        <div className=\"relative isolate overflow-hidden rounded-2xl border bg-card px-6 py-14 text-center sm:px-12 sm:py-16\">\n          {/* A soft glow from the top and a faint grid, both decoration. */}\n          <div aria-hidden className=\"absolute inset-x-0 -top-32 -z-10 mx-auto h-64 max-w-2xl rounded-full bg-primary/20 blur-3xl\" />\n          <div\n            aria-hidden\n            className=\"absolute inset-0 -z-10 [background-image:linear-gradient(to_right,var(--border)_1px,transparent_1px),linear-gradient(to_bottom,var(--border)_1px,transparent_1px)] [background-size:32px_32px] opacity-40 [mask-image:radial-gradient(ellipse_at_top,black,transparent_70%)]\"\n          />\n          <h2 className=\"mx-auto max-w-xl text-3xl font-semibold tracking-tight text-balance sm:text-4xl\">{title}</h2>\n          {description && <p className=\"mx-auto mt-4 max-w-md text-pretty text-muted-foreground\">{description}</p>}\n          <div className=\"mt-8 flex flex-wrap justify-center gap-3\">\n            <Action action={primary} className=\"group\">\n              {primary.label}{\" \"}\n              <ArrowRight className=\"transition-transform duration-(--duration-fast) group-hover:translate-x-0.5 rtl:-scale-x-100 rtl:group-hover:-translate-x-0.5\" />\n            </Action>\n            {secondary && (\n              <Action action={secondary} variant=\"outline\">\n                {secondary.label}\n              </Action>\n            )}\n          </div>\n          {note && <p className=\"mt-4 text-xs text-muted-foreground\">{note}</p>}\n        </div>\n\n        <div className=\"grid gap-10 py-14 sm:grid-cols-[1.5fr_repeat(var(--count),1fr)]\" style={{ \"--count\": columns.length } as React.CSSProperties}>\n          <div>\n            <a\n              href={brand.href}\n              className=\"inline-flex items-center gap-2 rounded-md font-semibold tracking-tight outline-none focus-visible:ring-2 focus-visible:ring-ring/50\"\n            >\n              {brand.logo ?? (\n                <span aria-hidden className=\"grid size-7 place-items-center rounded-lg bg-primary text-primary-foreground\">\n                  <Sparkles className=\"size-4\" />\n                </span>\n              )}\n              {brand.name}\n            </a>\n            {brand.tagline && <p className=\"mt-3 max-w-xs text-sm text-muted-foreground\">{brand.tagline}</p>}\n          </div>\n          {columns.map((column) => (\n            <nav key={column.title} aria-label={column.title}>\n              <h2 className=\"text-sm font-semibold\">{column.title}</h2>\n              <ul className=\"mt-4 grid gap-2.5\">\n                {column.links.map(({ label, href }) => (\n                  <li key={label}>\n                    <a href={href} className={`${link} text-sm`}>\n                      {label}\n                    </a>\n                  </li>\n                ))}\n              </ul>\n            </nav>\n          ))}\n        </div>\n\n        <div className=\"flex flex-col items-center gap-3 border-t py-6 text-xs text-muted-foreground sm:flex-row sm:justify-between\">\n          <p>{copyright ?? `© ${new Date().getFullYear()} ${brand.name}. All rights reserved.`}</p>\n          <div className=\"flex gap-4\">\n            {legal.map(({ label, href }) => (\n              <a key={label} href={href} className={link}>\n                {label}\n              </a>\n            ))}\n          </div>\n        </div>\n      </div>\n    </footer>\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":{}}}