Footer Component — Astro

Accessible site footer with copyright and optional links

Footer Component

A simple footer with role="contentinfo", optional site name, copyright year, and an optional list of links (e.g. Privacy, Terms, Docs). Uses semantic CSS variables and BEM classes.

Add this component

The command below includes <strong>Footer</strong>—run it in your project directory to install this component (and the CSS if needed). No prompts.

Choose your package manager — click a tab to select, then copy the command.

npm pnpm yarn bun
Live Example

Usage

Usage

Full example for each framework (Astro, Vanilla, Svelte, Vue, React). Switch framework via View as or by clicking a Usage tab—both stay in sync.

Astro Vanilla Svelte Vue React

Props

  • siteName (string, optional) — Name shown before the copyright (e.g. "My Site · © 2025")
  • year (number, optional) — Copyright year (default: current year)
  • links (array, optional) — List of { href, label } for footer nav links
  • class (string, optional) — Additional CSS classes on the root

Other frameworks: Vanilla · Svelte · Vue · React