{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer-01",
  "title": "Footer",
  "description": "A site footer: brand and tagline, a newsletter sign-up, three columns of links and a row of legal links. Renders in any Satori UI design system (cueit, skita, folio or a generated one): install a system first.",
  "registryDependencies": [
    "button",
    "input",
    "label"
  ],
  "files": [
    {
      "path": "design-systems/blocks/footer-01.tsx",
      "content": "\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Button } from \"@/components/ui/button\";\r\nimport { Input } from \"@/components/ui/input\";\r\nimport { Label } from \"@/components/ui/label\";\r\nimport { cn } from \"@/lib/utils\";\r\n\r\n/**\r\n * A site footer: the brand and one line about it, a newsletter sign-up,\r\n * columns of links, and a bottom row with the copyright and legal links.\r\n *\r\n * Written against the block contract only, so it takes the look of\r\n * whichever design system scopes it. The form calls `onSubscribe` with the\r\n * address, or posts to `action` when you give one.\r\n */\r\n\r\nexport type FooterLink = { label: string; href: string };\r\nexport type FooterColumn = { title: string; links: FooterLink[] };\r\n\r\nconst SAMPLE: FooterColumn[] = [\r\n  {\r\n    title: \"Product\",\r\n    links: [\r\n      { label: \"Invoices\", href: \"#\" },\r\n      { label: \"Reminders\", href: \"#\" },\r\n      { label: \"Payments\", href: \"#\" },\r\n      { label: \"Pricing\", href: \"#\" },\r\n    ],\r\n  },\r\n  {\r\n    title: \"Company\",\r\n    links: [\r\n      { label: \"About\", href: \"#\" },\r\n      { label: \"Customers\", href: \"#\" },\r\n      { label: \"Careers\", href: \"#\" },\r\n      { label: \"Contact\", href: \"#\" },\r\n    ],\r\n  },\r\n  {\r\n    title: \"Resources\",\r\n    links: [\r\n      { label: \"Help centre\", href: \"#\" },\r\n      { label: \"API docs\", href: \"#\" },\r\n      { label: \"Status\", href: \"#\" },\r\n      { label: \"Changelog\", href: \"#\" },\r\n    ],\r\n  },\r\n];\r\n\r\nconst LEGAL: FooterLink[] = [\r\n  { label: \"Privacy\", href: \"#\" },\r\n  { label: \"Terms\", href: \"#\" },\r\n  { label: \"Security\", href: \"#\" },\r\n];\r\n\r\nexport type Footer01Props = React.ComponentProps<\"footer\"> & {\r\n  brand?: string;\r\n  tagline?: string;\r\n  columns?: FooterColumn[];\r\n  legal?: FooterLink[];\r\n  /** Where the newsletter form posts. */\r\n  action?: React.ComponentProps<\"form\">[\"action\"];\r\n  /** Called with the address when the form is submitted without an `action`. */\r\n  onSubscribe?: (email: string) => void;\r\n  /** The newsletter form's heading and line. Pass null to hide the form. */\r\n  newsletter?: { title: string; description: string } | null;\r\n};\r\n\r\nexport function Footer01({\r\n  brand = \"Duebird\",\r\n  tagline = \"Invoices, reminders and payments for teams that would rather not chase.\",\r\n  columns = SAMPLE,\r\n  legal = LEGAL,\r\n  action,\r\n  onSubscribe,\r\n  newsletter = { title: \"The monthly ledger\", description: \"One email a month on getting paid faster.\" },\r\n  className,\r\n  ...props\r\n}: Footer01Props) {\r\n  const id = React.useId();\r\n  const [sent, setSent] = React.useState(false);\r\n\r\n  const onSubmit = (e: React.FormEvent<HTMLFormElement>) => {\r\n    if (action) return;\r\n    e.preventDefault();\r\n    const email = new FormData(e.currentTarget).get(\"email\");\r\n    onSubscribe?.(String(email ?? \"\"));\r\n    setSent(true);\r\n  };\r\n\r\n  return (\r\n    <footer className={cn(\"@container/footer w-full border-t px-6 pt-14 pb-8\", className)} {...props}>\r\n      <div className=\"mx-auto flex max-w-5xl flex-col gap-12\">\r\n        <div className=\"grid gap-10 @3xl/footer:grid-cols-[1.4fr_2fr]\">\r\n          <div className=\"flex flex-col gap-6\">\r\n            <div className=\"flex flex-col gap-3\">\r\n              <span className=\"flex items-center gap-2\">\r\n                <span aria-hidden=\"true\" className=\"ds-mark flex size-7 items-center justify-center text-xs\">\r\n                  {brand.charAt(0)}\r\n                </span>\r\n                <span className=\"ds-text font-semibold text-foreground\">{brand}</span>\r\n              </span>\r\n              <p className=\"ds-small max-w-xs text-muted-foreground\">{tagline}</p>\r\n            </div>\r\n\r\n            {newsletter && (\r\n              <form action={action} onSubmit={onSubmit} className=\"flex max-w-sm flex-col gap-2\">\r\n                <Label htmlFor={`${id}-email`} className=\"ds-text font-medium\">\r\n                  {newsletter.title}\r\n                </Label>\r\n                <p id={`${id}-hint`} className=\"ds-small text-muted-foreground\">\r\n                  {newsletter.description}\r\n                </p>\r\n                <div className=\"flex gap-2 pt-1\">\r\n                  <Input\r\n                    id={`${id}-email`}\r\n                    name=\"email\"\r\n                    type=\"email\"\r\n                    autoComplete=\"email\"\r\n                    placeholder=\"you@company.com\"\r\n                    aria-describedby={`${id}-hint`}\r\n                    required\r\n                  />\r\n                  <Button type=\"submit\" variant=\"outline\">\r\n                    Subscribe\r\n                  </Button>\r\n                </div>\r\n                <p role=\"status\" className=\"ds-small ds-ink min-h-5\">\r\n                  {sent ? \"Thanks. The next issue is on its way to you.\" : \"\"}\r\n                </p>\r\n              </form>\r\n            )}\r\n          </div>\r\n\r\n          <nav aria-label=\"Footer\" className=\"grid grid-cols-2 gap-8 @md/footer:grid-cols-3\">\r\n            {columns.map((column) => (\r\n              <div key={column.title} className=\"flex flex-col gap-3\">\r\n                <p className=\"ds-label\">{column.title}</p>\r\n                <ul className=\"flex flex-col gap-2\">\r\n                  {column.links.map((link) => (\r\n                    <li key={link.label}>\r\n                      <a\r\n                        href={link.href}\r\n                        className=\"ds-small text-muted-foreground transition-colors hover:text-foreground\"\r\n                      >\r\n                        {link.label}\r\n                      </a>\r\n                    </li>\r\n                  ))}\r\n                </ul>\r\n              </div>\r\n            ))}\r\n          </nav>\r\n        </div>\r\n\r\n        <div className=\"flex flex-col gap-3 border-t pt-6 @2xl/footer:flex-row @2xl/footer:items-center @2xl/footer:justify-between\">\r\n          <p className=\"ds-meta\">\r\n            &copy; {new Date().getFullYear()} {brand}. All rights reserved.\r\n          </p>\r\n          <ul className=\"flex flex-wrap gap-x-5 gap-y-2\">\r\n            {legal.map((link) => (\r\n              <li key={link.label}>\r\n                <a href={link.href} className=\"ds-meta transition-colors hover:text-foreground\">\r\n                  {link.label}\r\n                </a>\r\n              </li>\r\n            ))}\r\n          </ul>\r\n        </div>\r\n      </div>\r\n    </footer>\r\n  );\r\n}\r\n",
      "type": "registry:component",
      "target": "components/satori-ui/blocks/footer-01.tsx"
    }
  ],
  "type": "registry:block"
}