
Dual-column layout pairing brand information and social icons with a newsletter subscription box.
components/blocks/marketing/footer/footer-3.tsx
import { type FormEvent, useState } from "react";
import { ArrowRight } from "lucide-react";
import { cn } from "@/lib/utils.ts";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
const socialLinks = [
{
name: "Twitter",
icon: "https://cdn.paceui.com/brand-logos/x.svg",
isDarkInvert: true,
href: "#",
},
{
name: "GitHub",
icon: "https://cdn.paceui.com/brand-logos/github.svg",
isDarkInvert: true,
href: "#",
},
{
name: "LinkedIn",
icon: "https://cdn.paceui.com/brand-logos/linkedin.svg",
href: "#",
},
];
export function Footer3() {
const [email, setEmail] = useState("");
const handleSubmit = (e: FormEvent) => {
e.preventDefault();
setEmail("");
};
return (
<div>
<div className="bg-muted/60 flex h-36 items-center justify-center border-b border-dashed">
<p className="text-foreground/25 font-medium">Content Here</p>
</div>
<footer className="w-full py-12 md:py-16">
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 gap-10 md:grid-cols-2 lg:gap-16">
<div className="flex flex-col space-y-4">
<a href="#" className="flex items-center gap-2.5">
<div className="bg-primary text-primary-foreground flex size-9 shrink-0 items-center justify-center rounded-md text-sm font-medium">
P
</div>
<span className="text-lg font-medium tracking-tight">PaceUI</span>
</a>
<p className="text-muted-foreground max-w-md text-sm leading-relaxed font-normal">
Empowering developers and designers to build beautiful, accessible web applications with
clean React components and modern design systems.
</p>
<div className="text-muted-foreground flex items-center gap-0.5 pt-2">
{socialLinks.map((social) => {
return (
<Button
key={social.name}
variant="ghost"
size="icon"
aria-label={social.name}
className="hover:text-foreground rounded-full"
render={
<a href={social.href} aria-label={social.name}>
<img
src={social.icon}
className={cn("size-4", { "dark:invert": social.isDarkInvert })}
alt={social.name}
/>
</a>
}></Button>
);
})}
</div>
</div>
<div className="bg-muted/20 flex h-fit flex-col space-y-4 rounded-xl border p-4 md:p-5">
<div>
<h3 className="text-base font-medium">Stay up to date</h3>
<p className="text-muted-foreground mt-1 text-sm font-normal">
Get our monthly newsletter with component releases, design tips, and updates.
</p>
</div>
<form onSubmit={handleSubmit} className="flex flex-col gap-2 pt-2 sm:flex-row">
<Input
type="email"
placeholder="Enter your email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="shadow-none"
required
/>
<Button type="submit" className="shrink-0">
Subscribe <ArrowRight className="size-4" />
</Button>
</form>
</div>
</div>
<div className="text-muted-foreground mt-12 flex flex-col items-center justify-between gap-4 border-t pt-6 text-sm sm:flex-row">
<p>© {new Date().getFullYear()} PaceUI. All rights reserved.</p>
<div className="flex gap-6">
<a href="#" className="hover:text-foreground transition-colors">
Privacy Policy
</a>
<a href="#" className="hover:text-foreground transition-colors">
Terms of Service
</a>
</div>
</div>
</div>
</footer>
</div>
);
}