Skip to main

Design System

  • Welcome
  • Colors
  • Typography
  • Spacing

CSS

  • Utilities
  • Compositions

Component Library

  • Aside
  • Audio Player
  • Authors
  • Banners
  • Block quotes
  • Brand
  • Breadcrumbs
  • Browser compatibility table
  • Button
  • Callout
  • Cards
  • Carousel
  • Code blocks
  • Compare
  • Counter
  • Details
  • Ellipsis
  • Eyebrow
  • Floating Action Button
  • Feature Card
  • Figure
  • Fixed width Image
  • Form Fields
  • Headline
  • Hero
  • Hero Image
  • Icon Button
  • Indicator
  • Labels
  • Lists
  • Numbered headers
  • Page Header
  • Pagination
  • Pill
  • Preview Pagination
  • Prose
  • Spinner
  • Stack Nav
  • Stats
  • Status List
  • Tables
  • Tabs
  • Generated table of contents
  • Toggle Switch
  • Tooltips

Pagination - Component

The pagination pattern is a simple grid-based layout that shows a visual, presentation-only status.

No previous No previous
View full screen
Code

Source (Nunjucks)

<nav class="pagination" aria-label="Pagination {{ data.statusText }}">
<div class="pagination__container">
{% if data.prev %}
<a class="button" href="#">{{ data.prev }}</a>
{% endif %}
</div>
<div class="pagination__status" role="presentation" aria-hidden="true">
{{ data.statusText }}
</div>
<div class="pagination__container">
{% if data.next %}
<a class="button" href="#">{{ data.next }}</a>
{% endif %}
</div>
</nav>

Output

<nav class="pagination" aria-label="Pagination Page 3 of 17">
<div class="pagination__container">
<a class="button" href="#">Newer posts</a>
</div>
<div class="pagination__status" role="presentation" aria-hidden="true">
Page 3 of 17
</div>
<div class="pagination__container">
<a class="button" href="#">Older posts</a>
</div>
</nav>

Information

The .pagination__container elements aren't necessarily required, but they assist with the visual layout.

For example, if there is no previous control, the status will still be central and the next control will be pushed out to the end still, if you use the .pagination__container elements.

Key links

  • Sass File

Variants

No previous

View full screen
Code

Source (Nunjucks)

<nav class="pagination" aria-label="Pagination {{ data.statusText }}">
<div class="pagination__container">
{% if data.prev %}
<a class="button" href="#">{{ data.prev }}</a>
{% endif %}
</div>
<div class="pagination__status" role="presentation" aria-hidden="true">
{{ data.statusText }}
</div>
<div class="pagination__container">
{% if data.next %}
<a class="button" href="#">{{ data.next }}</a>
{% endif %}
</div>
</nav>

Output

<nav class="pagination" aria-label="Pagination Page 3 of 17">
<div class="pagination__container">
<a class="button" href="#">Newer posts</a>
</div>
<div class="pagination__status" role="presentation" aria-hidden="true">
Page 3 of 17
</div>
<div class="pagination__container"></div>
</nav>

No previous

View full screen
Code

Source (Nunjucks)

<nav class="pagination" aria-label="Pagination {{ data.statusText }}">
<div class="pagination__container">
{% if data.prev %}
<a class="button" href="#">{{ data.prev }}</a>
{% endif %}
</div>
<div class="pagination__status" role="presentation" aria-hidden="true">
{{ data.statusText }}
</div>
<div class="pagination__container">
{% if data.next %}
<a class="button" href="#">{{ data.next }}</a>
{% endif %}
</div>
</nav>

Output

<nav class="pagination" aria-label="Pagination Page 3 of 17">
<div class="pagination__container"></div>
<div class="pagination__status" role="presentation" aria-hidden="true">
Page 3 of 17
</div>
<div class="pagination__container">
<a class="button" href="#">Older posts</a>
</div>
</nav>

We want to help you build beautiful, accessible, fast, and secure websites that work cross-browser, and for all of your users. This site is our home for content to help you on that journey, written by members of the Chrome team, and external experts.

Contribute

  • File a bug
  • View source

Related content

  • developer.chrome.com
  • Chrome updates
  • Case studies
  • Podcasts
  • Shows

Connect

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Terms & Privacy
  • Community Guidelines

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.