Used to navigate between pages on a list.
Import
import { Pagination } from '@contentful/f36-components';
import { Pagination } from '@contentful/f36-pagination';
Examples
Basic
When not using the total prop, it's necessary to pass to the component the isLastPage
and the pageLength
prop, so the Pagination component can render correctly.
With total number of items
When you know how many items in total there will be paginated on, you should pass that prop and the Pagination component will make all the calculations.
With view per page selector
With total and view per page selector
Props (API reference)
Content guidelines
onPageChange
prop must update the list displayed to the user based on the page navigated to.
Accessibility
- All the necessary a11y attributes are provided for the pagination elements.
- Pass an
aria-label
to the Pagination to give more context to screen readers.