A centred logo and row of links, then an email signup beside the copyright.

Last updated

Open block
Show code
---
/**
 * Large 16: A centred logo and row of links, then an email signup beside the copyright.
 *
 * @block footers
 * @order 16
 */
import { Orbit } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import Button from '@/components/apogee/Button/Button.astro'
import Link from '@/components/apogee/Link/Link.astro'
import Input from '@/components/apogee/Input/Input.astro'
import { type FooterContent } from '@/components/apogee/sections/_shared/footers.ts'

/** @composable */
interface Props extends FooterContent {}

const {
  brand = 'Example',
  submitLabel = 'Subscribe',
  columns = [{ heading: 'Footer', links: [{ label: 'Overview', href: '#' }, { label: 'Features', href: '#' }, { label: 'Pricing', href: '#' }, { label: 'Careers', href: '#' }, { label: 'Help', href: '#' }, { label: 'Privacy', href: '#' }] }],
  navLabel = 'Footer',
  copyright = '© 2026 Example. All rights reserved.',
} = Astro.props
const flat = columns.flatMap((c) => c.links)
---

<Section as="footer" spacing="medium">
  <div class="flex flex-col items-center gap-8">
    <Link href="/" color="inherit" underline="none" class="inline-flex items-center gap-2 text-lg font-semibold "><FeaturedIcon theme="solid" color="primary" size="small"><Orbit /></FeaturedIcon>{brand}</Link>
    {flat.length > 0 && <nav aria-label={navLabel} class=""><ul class="grid list-none grid-cols-2 gap-x-8 gap-y-3 p-0 sm:flex sm:flex-wrap">{flat.map((l) => <li><Link href={l.href} color="neutral" underline="hover" class="font-semibold">{l.label}</Link></li>)}</ul></nav>}
  </div>
  <div class="mt-12 md:mt-16 flex flex-col-reverse gap-6 border-t border-neutral pt-8 md:flex-row md:items-center md:justify-between">
    {copyright && <p class="text-neutral-faded ">{copyright}</p>}
    <div class="flex flex-col gap-4 ">
      <form method="post" class="flex flex-col gap-3 sm:flex-row">
        <Input type="email" name="email" placeholder="Enter your email" aria-label="Email" autocomplete="email" required class="sm:w-64" />
        <Button type="submit">{submitLabel}</Button>
      </form>
    </div>
  </div>
</Section>

Add

npx @ava-ui/apogee add footers/large-16

This copies the block to src/components/apogee/blocks/footers/ with everything it uses: Button, FeaturedIcon, Input, Link, Section. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.

Accessibility

  • The email field is named “Email” (the placeholder is not a label); the form submits without JS.
  • The block is the page’s <footer> landmark; each link column is a <nav> named after its heading.