Skip to content

Site footer

Link columns, social links and legal links are props. The newsletter, payment badges and region switcher are optional, so a marketing site and a shop can share one footer.

  • layout: columns (default), simple (one row of links), centered
  • surface: light, alternate, brand, dark
  • siteName: used for the default copyright line, © <year> <siteName>
  • copyright: replaces the default copyright line
  • blurb, social: brand column text and { label, href, icon } links (SocialLinks)
  • columns: list of { heading, links }; simple and centered flatten them into one row
  • legal: list of { label, href } in the bottom bar
  • newsletter: { title, text, action, button } adds a NewsletterForm band above the columns
  • payments: list of payment method names, shown as small text badges
  • locales, currencies: lists of { label, value, selected }; adds a region and currency form that submits to localeAction with GET
  • id: footer id, also prefixes the form field ids (default site-footer)
  • Slots: logo, newsletter (replaces the built-in form), and the default slot for anything extra. In the columns layout each child of the default slot becomes its own column
<SiteFooter
siteName="Samla"
blurb="An Astro-first library of elements, components and sections."
social={[{ label: "Samla on GitHub", href: "https://github.com/benwellby/samla", icon: "github" }]}
columns={[{ heading: "Docs", links: [{ label: "Getting started", href: "/getting-started/" }] }]}
legal={[{ label: "Licence", href: "/licence/" }]}
>
<Logo href="/" slot="logo">samla<span aria-hidden="true">.</span></Logo>
</SiteFooter>
surface="dark", newsletter, and the payments and locale switcher a shop would use
layout="simple", surface="alternate"
layout="centered", surface="brand", newsletter