Beautiful map components. 100% Free, Zero config, one command setup.
TypeScript
import Link from "next/link";
import { Logo } from "./logo";
import { cn } from "@/lib/utils";
function GitHubIcon({ className }: { className?: string }) {
return (
<svg viewBox="0 0 1024 1024" fill="currentColor" className={className}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z"
transform="scale(64)"
fill="currentColor"
/>
</svg>
);
}
function XIcon({ className }: { className?: string }) {
return (
<svg viewBox="0 0 24 24" fill="currentColor" className={className}>
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-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>
);
}
const socialLinks = [
{
label: "GitHub",
href: "https://github.com/AnmolSaini16/mapcn",
icon: GitHubIcon,
},
{ label: "X", href: "https://x.com/anmold_s", icon: XIcon },
];
const footerLinks = {
product: [
{ label: "Documentation", href: "/docs" },
{ label: "Components", href: "/docs/basic-map" },
{ label: "Blocks", href: "/blocks" },
],
community: [
{
label: "GitHub",
href: "https://github.com/AnmolSaini16/mapcn",
external: true,
},
{ label: "Sponsor", href: "/sponsors", external: false },
],
resources: [
{ label: "MapLibre GL", href: "https://maplibre.org/", external: true },
{ label: "shadcn/ui", href: "https://ui.shadcn.com/", external: true },
{
label: "Tailwind CSS",
href: "https://tailwindcss.com/",
external: true,
},
],
};
const legalLinks = [
{ label: "Terms", href: "/terms" },
{ label: "Privacy", href: "/terms#privacy" },
{ label: "Refunds", href: "/terms#refunds" },
];
export function Footer({ className }: { className?: string }) {
return (
<footer className={cn("bg-muted/30 mt-24 border-t md:mt-40", className)}>
<div className="container py-12 md:py-16">
<div className="grid grid-cols-2 gap-8 md:grid-cols-5">
<div className="col-span-2 md:col-span-2">
<Logo className="w-fit" />
<p className="text-muted-foreground mt-2 max-w-xs text-sm leading-relaxed">
Free & open-source, ready-to-use, customizable map components for
React.
</p>
<div className="mt-4 flex items-center gap-4">
{socialLinks.map((social) => (
<Link
key={social.href}
href={social.href}
target="_blank"
rel="noopener noreferrer"
aria-label={social.label}
className="text-muted-foreground hover:text-foreground transition-colors"
>
<social.icon className="size-4" />
</Link>
))}
</div>
</div>
<div>
<h3 className="mb-3 text-sm font-semibold">Product</h3>
<ul className="space-y-2.5">
{footerLinks.product.map((link) => (
<li key={link.href}>
<Link
href={link.href}
className="text-muted-foreground hover:text-foreground text-sm transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
<div>
<h3 className="mb-3 text-sm font-semibold">Community</h3>
<ul className="space-y-2.5">
{footerLinks.community.map((link) => (
<li key={link.href}>
<Link
href={link.href}
target={link.external ? "_blank" : undefined}
rel={link.external ? "noopener noreferrer" : undefined}
className="text-muted-foreground hover:text-foreground text-sm transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
<div>
<h3 className="mb-3 text-sm font-semibold">Resources</h3>
<ul className="space-y-2.5">
{footerLinks.resources.map((link) => (
<li key={link.href}>
<Link
href={link.href}
target={link.external ? "_blank" : undefined}
rel={link.external ? "noopener noreferrer" : undefined}
className="text-muted-foreground hover:text-foreground text-sm transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
</div>
<div className="mt-12 flex flex-col gap-3 border-t pt-6 sm:flex-row sm:items-center sm:justify-between">
<p className="text-muted-foreground text-xs">
© {new Date().getFullYear()} mapcn. All rights reserved.
</p>
<nav aria-label="Legal" className="flex items-center gap-4 text-xs">
{legalLinks.map((link) => (
<Link
key={link.href}
href={link.href}
className="text-muted-foreground hover:text-foreground transition-colors"
>
{link.label}
</Link>
))}
</nav>
</div>
</div>
</footer>
);
}