Pagination

Pagination communicates the number of elements (pages, posts etc) that can be loaded within a given context. It shows the current position and enables direct access to previous and subsequent content items.

Variations

Primary Pagination

Staring from top, basic pagination, pagination with all options, pagination with helper text and elevated pagination.

Pagination Overline

Staring from top, basic pagination, pagination with all options, pagination with helper text and elevated pagination.

Pagination Underline

Staring from top, basic pagination, pagination with all options, pagination with helper text and elevated pagination.

Pagination Outline

Staring from top, basic pagination, pagination with all options, pagination with helper text and elevated pagination.

Pagination Minimal

Usage

Pagination consists of a list of links that help a user visualize the current location within a set of content. Use the pagination component to allow users to navigate to other pages, to the previous or next page and even to the first or last pages. On small screens, only the links to the previous and next page are showing.

Specs

Pagination uses the nav element with an inner list with a set of links. It comes in 4 styles, basic, outline, underline top and underline bottom. The links can contain icons and text:

  • Links: 0.875rem (14px) font size and 1rem (16px) horizontal padding.
  • Icons: 1em height (16px) pixel with and height.

Accessibility notes

  • The pagination links are wrapped <nav> element with a role=navigation and aria-label to make it clearer to users that this navigation landmark is intended for the pagination.
  • By using aria-label, we can add a meaningful label to each link, so instead of hearing the screen reader saying "Link, 1" it will be "Link, Goto Page 1".
  • To indicate which element is active, the aria-current label is used like so: aria-label="Current Page, Page 3" aria-current="true"