Web InnoventixFreeCode

Social Footer

Original · free

footer with social icons

byWeb InnoventixReact + Tailwind
footxsocialfooters
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-social.json
footx-social.tsx
"use client";

import { useState, useRef, type ReactNode, type FormEvent } from "react";
import { motion, useReducedMotion } from "motion/react";

type Status = "idle" | "error" | "success";

type FooterLink = { label: string; href: string };
type LinkGroup = { id: string; title: string; links: FooterLink[] };
type Social = { label: string; href: string; icon: ReactNode };

const LINK_GROUPS: LinkGroup[] = [
  {
    id: "product",
    title: "Product",
    links: [
      { label: "Uptime Monitoring", href: "#uptime" },
      { label: "Status Pages", href: "#status-pages" },
      { label: "Incident Alerts", href: "#alerts" },
      { label: "On-call Scheduling", href: "#on-call" },
      { label: "Integrations", href: "#integrations" },
    ],
  },
  {
    id: "company",
    title: "Company",
    links: [
      { label: "About", href: "#about" },
      { label: "Careers", href: "#careers" },
      { label: "Engineering Blog", href: "#blog" },
      { label: "Changelog", href: "#changelog" },
      { label: "Contact Sales", href: "#contact" },
    ],
  },
  {
    id: "resources",
    title: "Resources",
    links: [
      { label: "Documentation", href: "#docs" },
      { label: "API Reference", href: "#api" },
      { label: "System Status", href: "#system" },
      { label: "Community", href: "#community" },
      { label: "Support Center", href: "#support" },
    ],
  },
];

const SOCIALS: Social[] = [
  {
    label: "Follow Beacon on X",
    href: "https://x.com",
    icon: (
      <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="h-[18px] w-[18px]">
        <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24h-6.66l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
      </svg>
    ),
  },
  {
    label: "Beacon on GitHub",
    href: "https://github.com",
    icon: (
      <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="h-5 w-5">
        <path 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-.008-.868-.013-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.338-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 0112 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.203 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 0022 12.017C22 6.484 17.522 2 12 2z" />
      </svg>
    ),
  },
  {
    label: "Beacon on LinkedIn",
    href: "https://linkedin.com",
    icon: (
      <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="h-[18px] w-[18px]">
        <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 01-2.063-2.065 2.064 2.064 0 112.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.225 0z" />
      </svg>
    ),
  },
  {
    label: "Beacon on YouTube",
    href: "https://youtube.com",
    icon: (
      <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="h-5 w-5">
        <path d="M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.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>
    ),
  },
  {
    label: "Join the Beacon Discord",
    href: "https://discord.com",
    icon: (
      <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="h-5 w-5">
        <path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
      </svg>
    ),
  },
  {
    label: "Beacon RSS feed",
    href: "https://beacon.example/rss.xml",
    icon: (
      <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" className="h-[18px] w-[18px]">
        <path d="M6.503 20.752c0 1.794-1.456 3.248-3.251 3.248-1.796 0-3.252-1.454-3.252-3.248 0-1.794 1.456-3.248 3.252-3.248 1.795.001 3.251 1.454 3.251 3.248zm-6.503-12.572v4.811c6.05.062 10.96 4.966 11.022 11.009h4.817c-.062-8.71-7.118-15.758-15.839-15.82zm0-3.368c10.58.046 19.152 8.594 19.183 19.188h4.817c-.03-13.231-10.755-23.954-24-24v4.812z" />
      </svg>
    ),
  },
];

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

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

export default function FootxSocial() {
  const reduce = useReducedMotion();
  const inputRef = useRef<HTMLInputElement>(null);

  const [email, setEmail] = useState("");
  const [status, setStatus] = useState<Status>("idle");
  const [confirmed, setConfirmed] = useState("");
  const [openGroups, setOpenGroups] = useState<Record<string, boolean>>({});

  function toggle(id: string) {
    setOpenGroups((prev) => ({ ...prev, [id]: !prev[id] }));
  }

  function handleSubmit(e: FormEvent<HTMLFormElement>) {
    e.preventDefault();
    const value = email.trim();
    if (!EMAIL_RE.test(value)) {
      setStatus("error");
      inputRef.current?.focus();
      return;
    }
    setConfirmed(value);
    setStatus("success");
    setEmail("");
  }

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

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

  const reveal = reduce
    ? {}
    : {
        initial: { opacity: 0, y: 22 },
        whileInView: { opacity: 1, y: 0 },
        viewport: { once: true, margin: "-80px" },
        transition: { duration: 0.55, ease: "easeOut" as const },
      };

  return (
    <section className="relative w-full overflow-hidden border-t border-slate-200 bg-slate-50 text-slate-600 dark:border-slate-800/70 dark:bg-slate-950 dark:text-slate-400">
      <style>{`
        @keyframes footx-orb {
          0%, 100% { transform: translate3d(0,0,0) scale(1); }
          50% { transform: translate3d(5%, -7%, 0) scale(1.14); }
        }
        @keyframes footx-pulse {
          0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); }
          70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
          100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
        }
        .footx-orb { animation: footx-orb 20s ease-in-out infinite; }
        .footx-dot { animation: footx-pulse 2.4s ease-out infinite; }
        @media (prefers-reduced-motion: reduce) {
          .footx-orb, .footx-dot { animation: none !important; }
        }
      `}</style>

      {/* decorative background */}
      <div
        aria-hidden="true"
        className="footx-orb pointer-events-none absolute -top-24 right-[-6rem] h-72 w-72 rounded-full bg-gradient-to-br from-indigo-500/25 to-violet-500/10 blur-3xl dark:from-indigo-500/20 dark:to-violet-500/10"
      />
      <div
        aria-hidden="true"
        className="pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-indigo-500/40 to-transparent"
      />

      <motion.div
        {...reveal}
        className="relative mx-auto max-w-7xl px-6 py-16 sm:px-8 lg:px-12 lg:py-20"
      >
        <div className="grid grid-cols-1 gap-12 lg:grid-cols-12 lg:gap-8">
          {/* brand + newsletter */}
          <div className="lg:col-span-5">
            <a
              href="#top"
              className={`inline-flex items-center gap-3 rounded-xl ${ringBase}`}
            >
              <svg viewBox="0 0 32 32" className="h-9 w-9 shrink-0" aria-hidden="true">
                <rect width="32" height="32" rx="9" className="fill-indigo-600 dark:fill-indigo-500" />
                <circle cx="16" cy="16" r="2.6" fill="white" />
                <path
                  d="M11 21a7 7 0 0 1 0-10M9 24a11 11 0 0 1 0-16"
                  fill="none"
                  stroke="white"
                  strokeWidth="1.8"
                  strokeLinecap="round"
                  opacity="0.9"
                />
                <path
                  d="M21 11a7 7 0 0 1 0 10M23 8a11 11 0 0 1 0 16"
                  fill="none"
                  stroke="white"
                  strokeWidth="1.8"
                  strokeLinecap="round"
                  opacity="0.9"
                />
              </svg>
              <span className="text-xl font-semibold tracking-tight text-slate-900 dark:text-white">
                Beacon
              </span>
            </a>

            <p className="mt-5 max-w-sm text-sm leading-relaxed text-slate-600 dark:text-slate-400">
              Real-time uptime monitoring and incident alerts for teams that ship.
              Catch outages before your customers do — and tell the whole story with
              a status page they actually trust.
            </p>

            <form onSubmit={handleSubmit} noValidate className="mt-7 max-w-md">
              <label htmlFor="footx-email" className="text-sm font-medium text-slate-900 dark:text-slate-200">
                Get incident postmortems in your inbox
              </label>
              <div className="mt-2.5 flex flex-col gap-2.5 sm:flex-row">
                <input
                  id="footx-email"
                  ref={inputRef}
                  type="email"
                  inputMode="email"
                  autoComplete="email"
                  placeholder="you@company.com"
                  value={email}
                  onChange={(e) => {
                    setEmail(e.target.value);
                    if (status !== "idle") setStatus("idle");
                  }}
                  aria-invalid={status === "error"}
                  aria-describedby="footx-email-hint"
                  className={`w-full rounded-lg border bg-white px-3.5 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 dark:bg-slate-900 dark:text-white dark:placeholder:text-slate-500 ${ringBase} ${
                    status === "error"
                      ? "border-rose-400 dark:border-rose-500/70"
                      : "border-slate-300 dark:border-slate-700"
                  }`}
                />
                <button
                  type="submit"
                  className={`shrink-0 rounded-lg bg-indigo-600 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-indigo-500 active:bg-indigo-700 dark:bg-indigo-500 dark:hover:bg-indigo-400 ${ringBase}`}
                >
                  Subscribe
                </button>
              </div>
              <p
                id="footx-email-hint"
                role="status"
                aria-live="polite"
                className={`mt-2 text-xs leading-relaxed ${
                  status === "error"
                    ? "text-rose-600 dark:text-rose-400"
                    : status === "success"
                    ? "text-emerald-600 dark:text-emerald-400"
                    : "text-slate-500 dark:text-slate-500"
                }`}
              >
                {status === "error"
                  ? "Please enter a valid email address."
                  : status === "success"
                  ? `Thanks — a confirmation is on its way to ${confirmed}.`
                  : "One email per real incident. No spam, unsubscribe anytime."}
              </p>
            </form>

            <div className="mt-7">
              <p className="text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-500">
                Follow along
              </p>
              <ul className="mt-3 flex flex-wrap gap-2.5">
                {SOCIALS.map((s) => (
                  <li key={s.label}>
                    <motion.a
                      href={s.href}
                      target="_blank"
                      rel="noopener"
                      aria-label={s.label}
                      title={s.label}
                      whileHover={reduce ? undefined : { y: -3 }}
                      whileTap={reduce ? undefined : { scale: 0.92 }}
                      className={`flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-500 transition-colors hover:border-indigo-300 hover:text-indigo-600 dark:border-slate-800 dark:bg-slate-900 dark:text-slate-400 dark:hover:border-indigo-500/50 dark:hover:text-indigo-400 ${ringBase}`}
                    >
                      {s.icon}
                    </motion.a>
                  </li>
                ))}
              </ul>
            </div>
          </div>

          {/* link columns */}
          <nav
            aria-label="Footer"
            className="grid grid-cols-1 gap-x-8 gap-y-2 sm:grid-cols-3 lg:col-span-7"
          >
            {LINK_GROUPS.map((group) => {
              const open = openGroups[group.id] ?? false;
              return (
                <div
                  key={group.id}
                  className="border-b border-slate-200 py-3 sm:border-b-0 sm:py-0 dark:border-slate-800/70"
                >
                  <h3>
                    <button
                      type="button"
                      onClick={() => toggle(group.id)}
                      aria-expanded={open}
                      aria-controls={`footx-panel-${group.id}`}
                      className={`flex w-full items-center justify-between rounded-md text-sm font-semibold text-slate-900 dark:text-white sm:pointer-events-none sm:cursor-default ${ringBase}`}
                    >
                      <span>{group.title}</span>
                      <svg
                        aria-hidden="true"
                        viewBox="0 0 24 24"
                        fill="none"
                        stroke="currentColor"
                        strokeWidth="2"
                        strokeLinecap="round"
                        strokeLinejoin="round"
                        className={`h-4 w-4 text-slate-400 transition-transform duration-200 sm:hidden ${
                          open ? "rotate-180" : ""
                        }`}
                      >
                        <path d="m6 9 6 6 6-6" />
                      </svg>
                    </button>
                  </h3>
                  <ul
                    id={`footx-panel-${group.id}`}
                    className={`${open ? "block" : "hidden"} space-y-3 pb-1 pt-3 sm:block sm:pb-0`}
                  >
                    {group.links.map((link) => (
                      <li key={link.label}>
                        <a
                          href={link.href}
                          className={`inline-flex rounded text-sm text-slate-600 transition-colors hover:text-indigo-600 dark:text-slate-400 dark:hover:text-indigo-400 ${ringBase}`}
                        >
                          {link.label}
                        </a>
                      </li>
                    ))}
                  </ul>
                </div>
              );
            })}
          </nav>
        </div>

        {/* bottom bar */}
        <div className="mt-14 flex flex-col gap-6 border-t border-slate-200 pt-8 dark:border-slate-800/70 md:flex-row md:items-center md:justify-between">
          <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:gap-6">
            <p className="text-sm text-slate-500 dark:text-slate-500">
              &copy; {new Date().getFullYear()} Beacon Labs, Inc. All rights reserved.
            </p>
            <a
              href="#system"
              className={`inline-flex items-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700 transition-colors hover:bg-emerald-100 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400 dark:hover:bg-emerald-500/20 ${ringBase}`}
            >
              <span className="footx-dot h-2 w-2 rounded-full bg-emerald-500" aria-hidden="true" />
              All systems operational
            </a>
          </div>

          <div className="flex flex-wrap items-center gap-x-5 gap-y-3">
            {LEGAL.map((link) => (
              <a
                key={link.label}
                href={link.href}
                className={`rounded text-sm text-slate-500 transition-colors hover:text-slate-900 dark:text-slate-500 dark:hover:text-white ${ringBase}`}
              >
                {link.label}
              </a>
            ))}
            <button
              type="button"
              onClick={scrollTop}
              className={`inline-flex items-center gap-1.5 rounded-md border border-slate-300 px-3 py-1.5 text-sm font-medium text-slate-700 transition-colors hover:border-indigo-300 hover:text-indigo-600 dark:border-slate-700 dark:text-slate-300 dark:hover:border-indigo-500/50 dark:hover:text-indigo-400 ${ringBase}`}
            >
              <svg
                aria-hidden="true"
                viewBox="0 0 24 24"
                fill="none"
                stroke="currentColor"
                strokeWidth="2"
                strokeLinecap="round"
                strokeLinejoin="round"
                className="h-4 w-4"
              >
                <path d="m18 15-6-6-6 6" />
              </svg>
              Back to top
            </button>
          </div>
        </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 →