Pagination
See the Pagination
component in Garden's @zendeskgarden/react-pagination
package for the latest updates.
The pagination component provides styling for a multi-page control used to navigate long content lists such as data tables or search results.
- previous
- 1
- 2-3
- 4
- 5
- 6
- 7
- 8
- 9-10
- 11
- next
Page Anchors
The pagination component supports using anchor tags within page elements.
Page State
Use the .is-* modifier
classes to manage page state. Note this component removes default
:focus styling. In order to retain
accessibility, use JS to apply
.is-focused on keyboard (not mouse)
focus. By default, hovered styling will be applied on
:hover.
Accessible Markup
Use the following semantic HTML to make the pagination component keyboard and screen reader accessible. ARIA attributes are used to apply the expected page state styling.
Layout Rules
- Display a maximum of 9 pages.
- Use
.c-pagination__page--gapwhen there are more than 9 pages. - The first and last page numbers should always be displayed.
- Gap indicators should always be positioned either following the first or preceding the last page.
- Center current page selection when both gap indicators are displayed.
- Hide
.c-pagination__page--previousnavigation when the first page is current. - Hide
.c-pagination__page--nextnavigation when the last page is current.