Pagination affords navigation between pages of content, and it highlights which page is currently in view.
<nav class="mds-pagination__wrapper">
<ul class="mds-pagination">
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--disabled" aria-label="Go to First Page">
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-double-left--s"> </use>
</svg>
</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--disabled" aria-label="Go to Previous Page">
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-left--s"> </use>
</svg>
</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--selected" aria-label="Current Page, Page 1" aria-current="true"> 1 </a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 2">2</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 3">3</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 4">4</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 5">5</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 6">6</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 7">7</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 8">8</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Next Page">
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-right--s"> </use>
</svg>
</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Last Page">
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-double-right--s"> </use>
</svg>
</a>
</li>
</ul>
</nav>
pagination-left--s
/ pagination-right--s
, increments by one page.pagination-left-double--s
/ pagination-right-double--s
, jumps to the first or last page.<nav class="mds-pagination__wrapper">
<ul class="mds-pagination">
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to First Page">
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-double-left--s"> </use>
</svg> First </a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Previous Page">
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-left--s"> </use>
</svg> Previous </a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 1">1</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 2">2</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 3">3</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--selected" aria-label="Current Page, Page 4" aria-current="true"> 4 </a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--disabled" aria-label="Go to Next Page"> Next
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-right--s"> </use>
</svg>
</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--disabled" aria-label="Go to Last Page"> Last
<svg class="mds-icon mds-pagination__icon" aria-hidden="true">
<use xlink:href="/assets/icons/mds_icons.svg#angle-double-right--s"> </use>
</svg>
</a>
</li>
</ul>
</nav>
<nav class="mds-pagination__wrapper">
<ul class="mds-pagination">
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 1">1</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 2">2</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link mds-pagination__link--selected" aria-label="Current Page, Page 3" aria-current="true"> 3 </a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 4">4</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 5">5</a>
</li>
<li class="mds-pagination__item">
<a href="#" class="mds-pagination__link" aria-label="Go to Page 6">6</a>
</li>
</ul>
</nav>
<nav class=”mds-pagination__wrapper” role="navigation" aria-label="Pagination Navigation">
to explicitly communicate that page navigation is present and that it’s intended for pagination.<a href="/page-1" aria-label="Go to Page 1">
. This ensures that the screen readers deliver an appropriate message to a user for each link in the pagination component.<a href="/page-3" aria-label="Current Page, Page 3" aria-current="true">3</a>
.Class | Applies to | Outcome |
---|---|---|
|
|
Initializes the pagination component. Sets spacing and visual design around border wrapper pill which holds the individual navigation items. |
|
|
Sets visual design treatment and vertical positioning of items within their parent wrapper. |
|
|
Handles horizontal positioning of individual link items within the pagination wrapper. Exposes a hook JavaScript will use to handle the interaction and page transition functionality. |
|
|
Targets the icons specifically within the pagination wrapper and fine tunes the positioning of the icon within the item flow. |