Footer

The end of a page or a site, with a pager, columns of links and small print.

Use any of its parts, in order. The pager links to the previous and next pages; a lone next page still sits on the right. Link sections fall into as many columns as fit, and the bar holds a name or notice with anything else at its far end. These docs end each page with one.

Preview
basic.tsx
import {
  Footer,
  FooterBar,
  FooterColumns,
  FooterLink,
  FooterPager,
  FooterPagerLink,
  FooterSection,
} from "~/components/footer"

export default function Example() {
  return (
    <Footer className="w-full max-w-3xl">
      <FooterPager>
        <FooterPagerLink direction="previous" href="#paragraph-styles">
          Paragraph styles
        </FooterPagerLink>
        <FooterPagerLink direction="next" href="#page-templates">
          Page templates
        </FooterPagerLink>
      </FooterPager>
      <FooterColumns>
        <FooterSection title="Print">
          <FooterLink href="#editions">Editions</FooterLink>
          <FooterLink href="#pages">Pages</FooterLink>
          <FooterLink href="#ads">Ads</FooterLink>
        </FooterSection>
        <FooterSection title="Newsroom">
          <FooterLink href="#desk">The desk</FooterLink>
          <FooterLink href="#wires">Wires</FooterLink>
        </FooterSection>
        <FooterSection title="Help">
          <FooterLink href="#guides">Guides</FooterLink>
          <FooterLink href="#contact">Contact</FooterLink>
        </FooterSection>
      </FooterColumns>
      <FooterBar>
        <span>© 2026 The Daily</span>
        <a href="#privacy">Privacy</a>
      </FooterBar>
    </Footer>
  )
}

Dependencies

What it's built from and what's built from it in Base, read from the imports in its source.

UsesTextprimitive
Used byNothing yet.
Packages lucide-react@1.73.0

Installation

Set the project up for Base once first, as Getting started shows. Then add it with the CLI, or by hand.

With the CLI

terminal
npx shadcn@latest add https://design.zepez.dev/r/base/footer.json

Manually

Install its packages:

terminal
npm install lucide-react@1.73.0

Add the components it uses first, listed under Dependencies.

Then copy the source:

components/footer.tsx
import { ArrowLeft, ArrowRight } from "lucide-react"
import type * as React from "react"

import { textVariants } from "~/components/ui/text"
import { cn } from "~/lib/utils"

/*
 * The end of a page or a site. Any of its parts, in this order: a pager to the
 * previous and next pages, columns of titled links, and a bar of small print.
 *
 * <Footer>
 *   <FooterPager>
 *     <FooterPagerLink direction="previous" href="…">…</FooterPagerLink>
 *     <FooterPagerLink direction="next" href="…">…</FooterPagerLink>
 *   </FooterPager>
 *   <FooterColumns>
 *     <FooterSection title="…">
 *       <FooterLink href="…">…</FooterLink>
 *     </FooterSection>
 *   </FooterColumns>
 *   <FooterBar>…</FooterBar>
 * </Footer>
 */

/** The footer landmark, ruled off from what's above it. */
function Footer({ className, ...props }: React.ComponentProps<"footer">) {
  return (
    <footer
      data-slot="footer"
      className={cn("flex flex-col gap-2xl border-t border-border pt-2xl", className)}
      {...props}
    />
  )
}

/** The previous and next pages, side by side. Named "Pages" unless you name it. */
function FooterPager({
  "aria-label": label = "Pages",
  className,
  ...props
}: React.ComponentProps<"nav">) {
  return (
    <nav
      data-slot="footer-pager"
      aria-label={label}
      className={cn("grid gap-md sm:grid-cols-2", className)}
      {...props}
    />
  )
}

type FooterPagerLinkProps = React.ComponentProps<"a"> & {
  /** Which way it goes. A lone `next` still sits on the right. */
  direction: "previous" | "next"
}

/** A page before or after this one: which way it is, small, over its name. */
function FooterPagerLink({ direction, className, children, ...props }: FooterPagerLinkProps) {
  const Arrow = direction === "previous" ? ArrowLeft : ArrowRight
  return (
    <a
      data-slot="footer-pager-link"
      data-direction={direction}
      rel={direction === "previous" ? "prev" : "next"}
      className={cn(
        "group/pager flex min-w-0 flex-col gap-3xs rounded-lg border border-border px-lg py-md outline-none",
        "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/30",
        "data-[direction=next]:items-end data-[direction=next]:text-right sm:data-[direction=next]:col-start-2",
        className,
      )}
      {...props}
    >
      <span
        className={cn(
          textVariants({ size: "xs", tone: "muted" }),
          "inline-flex items-center gap-xs group-data-[direction=next]/pager:flex-row-reverse [&_svg]:size-3.5",
        )}
      >
        <Arrow aria-hidden="true" />
        {direction === "previous" ? "Previous" : "Next"}
      </span>
      <span className={cn(textVariants({ size: "sm", weight: "medium" }), "max-w-full truncate")}>
        {children}
      </span>
    </a>
  )
}

/** Sections of links in columns, as many as fit. */
function FooterColumns({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="footer-columns"
      className={cn("grid grid-cols-2 gap-xl sm:grid-cols-3 lg:grid-cols-4", className)}
      {...props}
    />
  )
}

type FooterSectionProps = Omit<React.ComponentProps<"nav">, "title"> & {
  /** A short heading, shown small and in capitals. It names the section's landmark. */
  title: string
}

/** A titled list of links. */
function FooterSection({ title, className, children, ...props }: FooterSectionProps) {
  return (
    <nav
      data-slot="footer-section"
      aria-label={title}
      className={cn("flex flex-col gap-sm", className)}
      {...props}
    >
      <h2 className={textVariants({ size: "xs", weight: "medium", caps: true, tone: "muted" })}>
        {title}
      </h2>
      <ul className="flex flex-col gap-xs">{children}</ul>
    </nav>
  )
}

/** A link in a section. */
function FooterLink({ className, children, ...props }: React.ComponentProps<"a">) {
  return (
    <li>
      <a
        data-slot="footer-link"
        className={cn(
          textVariants({ size: "sm", tone: "muted" }),
          "transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/30",
          className,
        )}
        {...props}
      >
        {children}
      </a>
    </li>
  )
}

/** The small print along the bottom: a name or notice, then anything else at the far end. */
function FooterBar({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="footer-bar"
      className={cn(
        textVariants({ size: "xs", tone: "muted" }),
        "flex flex-wrap items-center justify-between gap-x-lg gap-y-xs [&_a]:transition-colors [&_a]:hover:text-foreground",
        className,
      )}
      {...props}
    />
  )
}

export { Footer, FooterBar, FooterColumns, FooterLink, FooterPager, FooterPagerLink, FooterSection }
export type { FooterPagerLinkProps, FooterSectionProps }

API reference

Generated from Base's types. Props marked ours are added here; the rest come from the ui-sdk part it wraps. Every part also accepts its element's native attributes.

The footer landmark, ruled off from what's above it.

Takes the props of a native div.

FooterBar

The small print along the bottom: a name or notice, then anything else at the far end.

Takes the props of a native div.

FooterColumns

Sections of links in columns, as many as fit.

Takes the props of a native div.

A link in a section.

Takes the props of a native div.

FooterPager

The previous and next pages, side by side. Named "Pages" unless you name it.

Takes the props of a native div.

A page before or after this one: which way it is, small, over its name.

direction*ours

Which way it goes. A lone next still sits on the right.

Type "next" | "previous"

FooterSection

A titled list of links.

title*ours

A short heading, shown small and in capitals. It names the section's landmark.

Type string