Skip to main content

molecules

Pager

Previous, all, and next navigation between sibling pages. A missing neighbour becomes a greyed placeholder that keeps the layout.

Specimens

Both neighbours
{{ Pager.render({
  label: "Case studies",
  previous: {
    href: "/work/",
    title: "Previous project",
    meta: "Client name"
  },
  next: { href: "/about/", title: "Next project", meta: "Client name" },
  all: { href: "/work/", label: "All" }
}) }}
First page Without a previous link, a placeholder holds the column.
{{ Pager.render({
  label: "Chapters",
  next: { href: "/about/", title: "Chapter two" },
  all: { href: "/work/", label: "Contents" }
}) }}

Params

ParamTypeRequiredDescription
labelstringYesThe <nav>'s aria-label. Must differ from other navs on the page.
previous{ href, title, meta }NoOmitted → a greyed (opacity-40), aria-hidden placeholder that keeps the three-column layout.
next{ href, title, meta }NoSame.
all{ href, label }NoMiddle link with the grid icon. label defaults to “All”.
classesstring | variant map | arrayNoAppended to the <nav>.
styles{ link }NoAppended to each of the three links.

Notes

Give each pager on a page a distinct label, since it names the navigation landmark.