{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"footer-block","type":"registry:block","title":"Footer","description":"Site footer with a brand blurb, four link columns, a newsletter field that swaps to an inline success state, and a base row with legal links and a pulsing status dot.","author":"GetUrUI <hello@geturui.dev>","dependencies":["motion","lucide-react"],"registryDependencies":["@geturui/badge","@geturui/input"],"files":[{"path":"registry/geturui/blocks/footer-block.tsx","type":"registry:block","target":"components/blocks/footer-block.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { ArrowRight, Check, Mail, Rss, Sparkles } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Input } from \"@/components/ui/input\";\n\nexport interface FooterLink {\n  label: string;\n  href: string;\n  /** Small label after the link, e.g. \"New\". */\n  badge?: string;\n}\n\nexport interface FooterColumn {\n  title: string;\n  links: FooterLink[];\n}\n\nexport interface FooterNewsletter {\n  title: string;\n  description?: string;\n  placeholder?: string;\n  /** Resolve to show the subscribed state; reject to show an error. */\n  onSubscribe?: (email: string) => Promise<void> | void;\n}\n\nexport interface FooterBlockProps {\n  brand?: { name: string; description?: string; href?: string };\n  /** Up to four columns read best on desktop. */\n  columns?: FooterColumn[];\n  /** Pass null to hide the newsletter form. */\n  newsletter?: FooterNewsletter | null;\n  /** Text on the base row, e.g. \"© 2026 GetUrUI\". */\n  copyright?: string;\n  legal?: FooterLink[];\n  /** Status line with a pulsing dot. Pass null to hide. */\n  status?: string | null;\n  socials?: { label: string; href: string; icon: React.ReactNode }[];\n  className?: string;\n}\n\nconst DEFAULT_COLUMNS: FooterColumn[] = [\n  {\n    title: \"Product\",\n    links: [\n      { label: \"Components\", href: \"#\" },\n      { label: \"Blocks\", href: \"#\", badge: \"New\" },\n      { label: \"Templates\", href: \"#\" },\n      { label: \"Pricing\", href: \"#\" },\n    ],\n  },\n  {\n    title: \"Developers\",\n    links: [\n      { label: \"Documentation\", href: \"#\" },\n      { label: \"CLI\", href: \"#\" },\n      { label: \"MCP server\", href: \"#\" },\n      { label: \"Changelog\", href: \"#\" },\n    ],\n  },\n  {\n    title: \"Resources\",\n    links: [\n      { label: \"Motion guide\", href: \"#\" },\n      { label: \"Design tokens\", href: \"#\" },\n      { label: \"Showcase\", href: \"#\" },\n      { label: \"Licence\", href: \"#\" },\n    ],\n  },\n  {\n    title: \"Company\",\n    links: [\n      { label: \"About\", href: \"#\" },\n      { label: \"Blog\", href: \"#\" },\n      { label: \"Careers\", href: \"#\", badge: \"Hiring\" },\n      { label: \"Contact\", href: \"#\" },\n    ],\n  },\n];\n\nconst DEFAULT_NEWSLETTER: FooterNewsletter = {\n  title: \"Get new components first\",\n  description: \"One short email when something ships. No spam, unsubscribe any time.\",\n  placeholder: \"you@company.com\",\n};\n\nconst EMAIL_RE = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;\n\nfunction Newsletter({ newsletter }: { newsletter: FooterNewsletter }) {\n  const [email, setEmail] = React.useState(\"\");\n  const [state, setState] = React.useState<\"idle\" | \"loading\" | \"done\">(\"idle\");\n  const [error, setError] = React.useState<string | undefined>();\n  const id = React.useId();\n\n  async function submit(e: React.FormEvent) {\n    e.preventDefault();\n    if (state !== \"idle\") return;\n    if (!EMAIL_RE.test(email.trim())) {\n      setError(\"Enter a valid email address\");\n      return;\n    }\n    setError(undefined);\n    setState(\"loading\");\n    try {\n      if (newsletter.onSubscribe) await newsletter.onSubscribe(email.trim());\n      else await new Promise((r) => setTimeout(r, 700));\n      setState(\"done\");\n    } catch {\n      setState(\"idle\");\n      setError(\"Something went wrong. Try again.\");\n    }\n  }\n\n  return (\n    <div className=\"grid gap-3\">\n      <div className=\"grid gap-1\">\n        <h3 id={`${id}-title`} className=\"text-sm font-semibold text-ink\">\n          {newsletter.title}\n        </h3>\n        {newsletter.description && <p className=\"text-[13px] leading-5 text-ink-muted\">{newsletter.description}</p>}\n      </div>\n      <AnimatePresence mode=\"popLayout\" initial={false}>\n        {state === \"done\" ? (\n          <motion.p\n            key=\"done\"\n            role=\"status\"\n            initial={{ opacity: 0, y: 6, filter: \"blur(8px)\" }}\n            animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n            transition={{ type: \"spring\", stiffness: 320, damping: 28 }}\n            className=\"inline-flex h-10 items-center gap-2 rounded-[10px] bg-volt-soft px-3 text-sm font-medium text-volt-ink\"\n          >\n            <Check className=\"size-4\" aria-hidden /> You are on the list\n          </motion.p>\n        ) : (\n          <motion.form\n            key=\"form\"\n            noValidate\n            onSubmit={submit}\n            aria-labelledby={`${id}-title`}\n            exit={{ opacity: 0, y: -6, filter: \"blur(8px)\" }}\n            transition={{ duration: 0.2 }}\n          >\n            <Input\n              type=\"email\"\n              name=\"email\"\n              aria-label=\"Email address\"\n              placeholder={newsletter.placeholder ?? \"you@company.com\"}\n              autoComplete=\"email\"\n              icon={<Mail className=\"size-4\" aria-hidden />}\n              value={email}\n              error={error}\n              onChange={(e) => {\n                setEmail(e.target.value);\n                if (error) setError(undefined);\n              }}\n              className=\"pr-1\"\n              trailing={\n                <motion.button\n                  type=\"submit\"\n                  whileTap={{ scale: 0.92 }}\n                  aria-label=\"Subscribe\"\n                  aria-busy={state === \"loading\" || undefined}\n                  className=\"grid size-8 shrink-0 place-items-center rounded-[8px] bg-volt text-on-volt outline-none transition-shadow hover:shadow-glow focus-visible:shadow-[var(--focus-ring)]\"\n                >\n                  <motion.span animate={state === \"loading\" ? { x: [0, 4, 0] } : { x: 0 }} transition={{ duration: 0.6, repeat: state === \"loading\" ? Infinity : 0 }}>\n                    <ArrowRight className=\"size-4\" />\n                  </motion.span>\n                </motion.button>\n              }\n            />\n          </motion.form>\n        )}\n      </AnimatePresence>\n    </div>\n  );\n}\n\n/** Site footer: brand blurb, four link columns, a newsletter field with an inline success state, and a base row with legal links and a live status dot. */\nexport function FooterBlock({\n  brand = { name: \"GetUrUI\", description: \"Animated React components and page blocks you copy into your app and make your own.\" },\n  columns = DEFAULT_COLUMNS,\n  newsletter = DEFAULT_NEWSLETTER,\n  copyright = \"© 2026 GetUrUI. All rights reserved.\",\n  legal = [\n    { label: \"Privacy\", href: \"#\" },\n    { label: \"Terms\", href: \"#\" },\n    { label: \"Cookies\", href: \"#\" },\n  ],\n  status = \"All systems normal\",\n  socials = [\n    { label: \"RSS feed\", href: \"#\", icon: <Rss className=\"size-4\" /> },\n    { label: \"Email us\", href: \"#\", icon: <Mail className=\"size-4\" /> },\n    { label: \"What's new\", href: \"#\", icon: <Sparkles className=\"size-4\" /> },\n  ],\n  className,\n}: FooterBlockProps) {\n  return (\n    <footer className={cn(\"@container w-full border-t border-border bg-bg px-4 pt-14 sm:px-6 sm:pt-16\", className)}>\n      <div className=\"mx-auto grid max-w-6xl gap-12\">\n        <div className=\"grid gap-12 @4xl:grid-cols-[minmax(0,1.3fr)_minmax(0,2.7fr)] @4xl:gap-16\">\n          <div className=\"grid content-start gap-6\">\n            <a href={brand.href ?? \"#\"} className=\"inline-flex items-center gap-2.5 justify-self-start rounded-md outline-none focus-visible:shadow-[var(--focus-ring)]\">\n              <span aria-hidden className=\"grid size-8 place-items-center rounded-[10px] bg-volt font-display text-[15px] font-bold text-on-volt\">\n                {brand.name.charAt(0)}\n              </span>\n              <span className=\"font-display text-lg font-semibold tracking-[-0.3px] text-ink\">{brand.name}</span>\n            </a>\n            {brand.description && <p className=\"max-w-xs text-sm leading-[22px] text-ink-muted\">{brand.description}</p>}\n            {newsletter && (\n              <div className=\"max-w-sm\">\n                <Newsletter newsletter={newsletter} />\n              </div>\n            )}\n          </div>\n\n          <nav aria-label=\"Footer\" className=\"grid grid-cols-2 gap-x-6 gap-y-10 @xl:grid-cols-4\">\n            {columns.map((col) => (\n              <div key={col.title} className=\"grid content-start gap-4\">\n                <h3 className=\"text-[13px] font-semibold text-ink\">{col.title}</h3>\n                <ul className=\"grid gap-2.5\">\n                  {col.links.map((l) => (\n                    <li key={l.label}>\n                      <a\n                        href={l.href}\n                        className=\"group/link inline-flex items-center gap-2 rounded-xs text-sm text-ink-muted outline-none transition-colors hover:text-ink focus-visible:shadow-[var(--focus-ring)]\"\n                      >\n                        <span className=\"transition-transform duration-300 ease-[var(--ease-spring)] group-hover/link:translate-x-0.5\">{l.label}</span>\n                        {l.badge && <Badge tone=\"new\">{l.badge}</Badge>}\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </nav>\n        </div>\n\n        <div className=\"flex flex-col gap-4 border-t border-border py-6 text-[13px] text-ink-subtle @xl:flex-row @xl:items-center @xl:justify-between\">\n          <div className=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\n            <span>{copyright}</span>\n            {legal.map((l) => (\n              <a key={l.label} href={l.href} className=\"rounded-xs outline-none transition-colors hover:text-ink focus-visible:shadow-[var(--focus-ring)]\">\n                {l.label}\n              </a>\n            ))}\n          </div>\n          <div className=\"flex items-center gap-4\">\n            {status && (\n              <span className=\"inline-flex items-center gap-2 text-ink-muted\">\n                <span aria-hidden className=\"size-1.5 rounded-full bg-success text-success animate-pulse-dot\" />\n                {status}\n              </span>\n            )}\n            {socials.length > 0 && (\n              <div className=\"flex items-center gap-1\">\n                {socials.map((s) => (\n                  <a\n                    key={s.label}\n                    href={s.href}\n                    aria-label={s.label}\n                    className=\"grid size-8 place-items-center rounded-full text-ink-subtle outline-none transition-colors hover:bg-surface-hover hover:text-ink focus-visible:shadow-[var(--focus-ring)]\"\n                  >\n                    {s.icon}\n                  </a>\n                ))}\n              </div>\n            )}\n          </div>\n        </div>\n      </div>\n    </footer>\n  );\n}\n"},{"path":"LICENSE-geturui.md","type":"registry:file","target":"LICENSE-geturui.md","content":"MIT License\n\nCopyright (c) 2026 geturui.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"}],"categories":["blocks","footer","newsletter","links","navigation","site"],"meta":{"tier":"free","license":"MIT","docs":"https://geturui.com/docs/footer-block"}}