Displays the active page and allows navigation between multiple pages.
OUI exports 3 pagination-related components:
There is currently only a single light variant available.
You can set the showControls prop to true to display the next and previous buttons.
In case you want to loop the pagination, you can set the loop property to true. The cursor will go back to the first page when it reaches the last page and vice versa.
You can change the initial page by setting the initialPage property.
You can set the isCompact property to true to display a reduced version of the pagination.
Selected Page: 1
You can control the number of pages to show before and after the current page by setting the siblings property.
1 Sibling (default)
2 Siblings
3 Siblings
You can control the number of pages to show at the beginning and end of the pagination by setting the boundaries property.
1 Boundary (default)
2 Boundaries
3 Boundaries
You can use the renderItem property to customize the pagination items.
You can customize the Pagination component by passing custom Tailwind CSS classes to the component slots.
In case you need to customize the pagination even further, you can use the usePagination hook to create your own implementation.
Active page: 1
Pagination has the following attributes on the base element:
showControls prop.loop prop.dotsJump prop.total prop.activePage prop.navigation by default.getItemAriaLabel function.