Skip to content

Search

Start typing to search.


Show all pages

Documentation

navigation

Pagination

Links to the pages of a long list, such as invoices or lessons.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

A list of links in a <nav>. The current page has aria-current="page"; an ellipsis stands for skipped pages.

HTML

Examples

On the first page

A step that is not possible keeps its place with aria-disabled="true" and no href.

HTML

Guidance and accessibility

When to use

  • Use pagination when a list is split into pages that people can link to and come back to.
  • Show the first and last page and a few around the current one, with an ellipsis for the rest.

Accessibility

  • Give the <nav> an aria-label that names the list, such as “Invoice pages”.
  • Label number links, such as aria-label="Page 2", since a bare “2” says little when read out of context.
  • Hide the ellipsis from screen readers with aria-hidden="true".
  • On touch screens every link has a target of at least 44 by 44 pixels.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the pagination component
ClassKindUse it for
ca-paginationComponentThe <nav> around the page links.
ca-pagination__listPartThe <ul>; it wraps on narrow screens.
ca-pagination__linkPartA link to one page, or to the previous or next page.
ca-pagination__ellipsisPartStands for pages that are not shown.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />