Web InnoventixFreeCode

Centered Footer

Original · free

centred logo footer with links

byWeb InnoventixReact + Tailwind
footxcenteredfooters
Open

Copy prompt gives Claude Code, Cursor or v0 a ready-to-paste prompt that recreates this exact component.

npx shadcn@latest add https://webinnoventix.com/r/footx-centered.json
footx-centered.tsx
"use client";

import { useId, useState, type FormEvent } from "react";
import { motion, useReducedMotion, type Variants } from "motion/react";

type FooterLink = { label: string; href: string };

type SocialLink = { label: string; href: string; icon: "x" | "github" | "linkedin" | "youtube" };

const PRIMARY_LINKS: FooterLink[] = [
  { label: "Product", href: "#product" },
  { label: "Pricing", href: "#pricing" },
  { label: "Docs", href: "#docs" },
  { label: "Changelog", href: "#changelog" },
  { label: "Blog", href: "#blog" },
  { label: "Careers", href: "#careers" },
  { label: "Contact", href: "#contact" },
];

const LEGAL_LINKS: FooterLink[] = [
  { label: "Privacy", href: "#privacy" },
  { label: "Terms", href: "#terms" },
  { label: "Security", href: "#security" },
];

const SOCIAL_LINKS: SocialLink[] = [
  { label: "Meridian on X", href: "https://x.com", icon: "x" },
  { label: "Meridian on GitHub", href: "https://github.com", icon: "github" },
  { label: "Meridian on LinkedIn", href: "https://linkedin.com", icon: "linkedin" },
  { label: "Meridian on YouTube", href: "https://youtube.com", icon: "youtube" },
];

const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

type SubmitStatus = "idle" | "invalid" | "submitting" | "success";

function SocialIcon({ name }: { name: SocialLink["icon"] }) {
  const common = {
    viewBox: "0 0 24 24",
    className: "h-[18px] w-[18px]",
    "aria-hidden": true as const,
    focusable: false as const,
  };
  switch (name) {
    case "x":
      return (
        <svg {...common} fill="currentColor">
          <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24h-6.66l-5.214-6.817-5.968 6.817H1.675l7.73-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231Zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77Z" />
        </svg>
      );
    case "github":
      return (
        <svg {...common} fill="currentColor">
          <path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.339-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.02 10.02 0 0 0 22 12.017C22 6.484 17.522 2 12 2Z"
          />
        </svg>
      );
    case "linkedin":
      return (
        <svg {...common} fill="currentColor">
          <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286ZM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065Zm1.782 13.019H3.555V9h3.564v11.452ZM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003Z" />
        </svg>
      );
    case "youtube":
      return (
        <svg {...common} fill="currentColor">
          <path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814ZM9.545 15.568V8.432L15.818 12l-6.273 3.568Z" />
        </svg>
      );
  }
}

export default function FootxCentered() {
  const reduce = useReducedMotion();
  const [email, setEmail] = useState("");
  const [status, setStatus] = useState<SubmitStatus>("idle");

  const fieldId = useId();
  const helpId = useId();
  const statusId = useId();

  const container: Variants = {
    hidden: {},
    show: { transition: { staggerChildren: reduce ? 0 : 0.07 } },
  };
  const item: Variants = {
    hidden: reduce ? { opacity: 1, y: 0 } : { opacity: 0, y: 16 },
    show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: "easeOut" } },
  };

  function handleSubmit(event: FormEvent<HTMLFormElement>) {
    event.preventDefault();
    if (status === "submitting") return;
    if (!EMAIL_RE.test(email.trim())) {
      setStatus("invalid");
      return;
    }
    setStatus("submitting");
    window.setTimeout(() => {
      setStatus("success");
      setEmail("");
    }, 900);
  }

  function scrollToTop() {
    window.scrollTo({ top: 0, behavior: reduce ? "auto" : "smooth" });
  }

  const ring =
    "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 focus-visible:ring-offset-neutral-50 dark:focus-visible:ring-offset-neutral-950";

  const year = new Date().getFullYear();

  return (
    <section className="relative w-full overflow-hidden bg-neutral-50 px-6 py-20 text-neutral-700 sm:py-24 dark:bg-neutral-950 dark:text-neutral-300">
      <style>{`
        @keyframes footx-ping {
          75%, 100% { transform: scale(2.4); opacity: 0; }
        }
        @keyframes footx-glow {
          0%, 100% { opacity: 0.55; }
          50% { opacity: 1; }
        }
        .footx-ping-ring { animation: footx-ping 2s cubic-bezier(0,0,0.2,1) infinite; }
        .footx-glow-line { animation: footx-glow 5s ease-in-out infinite; }
        @media (prefers-reduced-motion: reduce) {
          .footx-ping-ring, .footx-glow-line { animation: none !important; }
        }
      `}</style>

      {/* Decorative backdrop */}
      <div
        aria-hidden="true"
        className="pointer-events-none absolute inset-x-0 top-0 -z-0 flex justify-center"
      >
        <div className="h-64 w-[42rem] max-w-full rounded-full bg-gradient-to-b from-indigo-400/20 via-violet-400/10 to-transparent blur-3xl dark:from-indigo-500/20 dark:via-violet-500/10" />
      </div>

      <motion.div
        variants={container}
        initial="hidden"
        whileInView="show"
        viewport={{ once: true, amount: 0.2 }}
        className="relative z-10 mx-auto flex max-w-3xl flex-col items-center text-center"
      >
        {/* Logo */}
        <motion.a
          variants={item}
          href="#top"
          aria-label="Meridian home"
          className={`group inline-flex flex-col items-center gap-3 rounded-2xl px-2 py-1 ${ring}`}
        >
          <span className="relative flex h-14 w-14 items-center justify-center rounded-2xl bg-neutral-900 text-white shadow-lg shadow-indigo-500/10 ring-1 ring-neutral-900/10 transition-transform duration-300 group-hover:-translate-y-0.5 dark:bg-white dark:text-neutral-900 dark:ring-white/10">
            <svg viewBox="0 0 32 32" className="h-7 w-7" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" strokeWidth={1.6} strokeLinecap="round">
              <circle cx="16" cy="16" r="12.5" />
              <ellipse cx="16" cy="16" rx="6" ry="12.5" />
              <line x1="3.5" y1="16" x2="28.5" y2="16" />
            </svg>
          </span>
          <span className="text-2xl font-semibold tracking-tight text-neutral-900 dark:text-white">
            Meridian
          </span>
        </motion.a>

        <motion.p variants={item} className="mt-4 max-w-md text-balance text-sm leading-relaxed text-neutral-500 dark:text-neutral-400">
          Product analytics your whole team can actually read. Track what ships, measure what matters, decide with the data in front of you.
        </motion.p>

        {/* Status pill */}
        <motion.a
          variants={item}
          href="#status"
          className={`mt-6 inline-flex items-center gap-2 rounded-full border border-neutral-200 bg-white/70 px-3.5 py-1.5 text-xs font-medium text-neutral-600 backdrop-blur transition-colors hover:border-emerald-300 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-900/60 dark:text-neutral-400 dark:hover:border-emerald-500/40 dark:hover:text-white ${ring}`}
        >
          <span className="relative flex h-2 w-2">
            <span className="footx-ping-ring absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75" />
            <span className="footx-glow-line relative inline-flex h-2 w-2 rounded-full bg-emerald-500" />
          </span>
          All systems operational
        </motion.a>

        {/* Newsletter */}
        <motion.form
          variants={item}
          onSubmit={handleSubmit}
          noValidate
          className="mt-10 w-full max-w-md"
        >
          <label htmlFor={fieldId} className="sr-only">
            Email address
          </label>
          <div className="flex flex-col gap-2 sm:flex-row">
            <input
              id={fieldId}
              type="email"
              name="email"
              inputMode="email"
              autoComplete="email"
              placeholder="you@company.com"
              value={email}
              onChange={(e) => {
                setEmail(e.target.value);
                if (status === "invalid" || status === "success") setStatus("idle");
              }}
              aria-invalid={status === "invalid"}
              aria-describedby={`${helpId} ${statusId}`}
              disabled={status === "submitting"}
              className={`w-full rounded-xl border border-neutral-300 bg-white px-4 py-2.5 text-sm text-neutral-900 shadow-sm transition-colors placeholder:text-neutral-400 disabled:opacity-60 dark:border-neutral-700 dark:bg-neutral-900 dark:text-white dark:placeholder:text-neutral-500 ${ring}`}
            />
            <button
              type="submit"
              disabled={status === "submitting"}
              className={`inline-flex shrink-0 items-center justify-center gap-2 rounded-xl bg-indigo-600 px-5 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-indigo-500 disabled:cursor-not-allowed disabled:opacity-70 dark:bg-indigo-500 dark:hover:bg-indigo-400 ${ring}`}
            >
              {status === "submitting" ? (
                <>
                  <svg viewBox="0 0 24 24" className="h-4 w-4 animate-spin" aria-hidden="true" focusable="false" fill="none">
                    <circle cx="12" cy="12" r="9" stroke="currentColor" strokeWidth="3" className="opacity-25" />
                    <path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" strokeWidth="3" strokeLinecap="round" />
                  </svg>
                  Subscribing
                </>
              ) : (
                "Subscribe"
              )}
            </button>
          </div>

          <p id={helpId} className="mt-2 text-xs text-neutral-400 dark:text-neutral-500">
            The monthly changelog and product notes. No spam, unsubscribe anytime.
          </p>

          <p
            id={statusId}
            role="status"
            aria-live="polite"
            className={`mt-2 min-h-[1.25rem] text-xs font-medium ${
              status === "success"
                ? "text-emerald-600 dark:text-emerald-400"
                : status === "invalid"
                  ? "text-rose-600 dark:text-rose-400"
                  : "text-transparent"
            }`}
          >
            {status === "success" && (
              <span className="inline-flex items-center gap-1.5">
                <svg viewBox="0 0 20 20" className="h-4 w-4" aria-hidden="true" focusable="false" fill="currentColor">
                  <path fillRule="evenodd" clipRule="evenodd" d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0l-3.5-3.5a1 1 0 1 1 1.4-1.4l2.8 2.79 6.8-6.79a1 1 0 0 1 1.4 0Z" />
                </svg>
                You&apos;re on the list. Check your inbox to confirm.
              </span>
            )}
            {status === "invalid" && "Please enter a valid email address."}
          </p>
        </motion.form>

        {/* Primary nav */}
        <motion.nav variants={item} aria-label="Footer" className="mt-8 w-full">
          <ul className="flex flex-wrap items-center justify-center gap-x-6 gap-y-3">
            {PRIMARY_LINKS.map((link) => (
              <li key={link.label}>
                <a
                  href={link.href}
                  className={`rounded-md px-1 py-0.5 text-sm font-medium text-neutral-600 transition-colors hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-white ${ring}`}
                >
                  {link.label}
                </a>
              </li>
            ))}
          </ul>
        </motion.nav>

        {/* Social */}
        <motion.ul variants={item} className="mt-8 flex items-center justify-center gap-3">
          {SOCIAL_LINKS.map((social) => (
            <li key={social.label}>
              <a
                href={social.href}
                target="_blank"
                rel="noopener"
                aria-label={social.label}
                className={`flex h-10 w-10 items-center justify-center rounded-full border border-neutral-200 bg-white text-neutral-500 transition-colors hover:border-neutral-300 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-400 dark:hover:border-neutral-700 dark:hover:text-white ${ring}`}
              >
                <SocialIcon name={social.icon} />
              </a>
            </li>
          ))}
        </motion.ul>

        {/* Divider */}
        <motion.div variants={item} className="mt-12 h-px w-full max-w-md bg-gradient-to-r from-transparent via-neutral-300 to-transparent dark:via-neutral-800" />

        {/* Bottom bar */}
        <motion.div
          variants={item}
          className="mt-6 flex w-full flex-col items-center gap-4 sm:flex-row sm:justify-between"
        >
          <p className="text-xs text-neutral-500 dark:text-neutral-500">
            &copy; {year} Meridian Labs, Inc. All rights reserved.
          </p>

          <ul className="flex items-center gap-x-5">
            {LEGAL_LINKS.map((link) => (
              <li key={link.label}>
                <a
                  href={link.href}
                  className={`rounded-md text-xs text-neutral-500 transition-colors hover:text-neutral-900 dark:text-neutral-500 dark:hover:text-white ${ring}`}
                >
                  {link.label}
                </a>
              </li>
            ))}
          </ul>

          <button
            type="button"
            onClick={scrollToTop}
            className={`inline-flex items-center gap-1.5 rounded-full border border-neutral-200 bg-white px-3 py-1.5 text-xs font-medium text-neutral-600 transition-colors hover:border-neutral-300 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-400 dark:hover:text-white ${ring}`}
          >
            Back to top
            <svg viewBox="0 0 20 20" className="h-3.5 w-3.5" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">
              <path d="M10 16V4M5 9l5-5 5 5" />
            </svg>
          </button>
        </motion.div>
      </motion.div>
    </section>
  );
}

Dependencies

motion

Licence

Built by Web Innoventix. Free for personal and commercial use, no attribution required.

Built by Web Innoventix

Need a custom interface, a full website, or SEO that gets you cited by AI? We design, build and rank it end to end.

Get a free quote

Similar components

Browse all →