Overview
…
Installation
Usage
Variants
Basic
With Ellipsis (Many Pages)
……
Usage with Data Table
API Reference
Controlled current page (1-indexed).
Callback fired when the user navigates to a different page.
Uncontrolled default page.
Total number of pages (required).
Number of page buttons shown on each side of the current page.
Shows first («) and last (») page jump buttons.
Button size. Values:
sm · md · lgAdditional Tailwind classes for custom overrides.
Accessibility
- Pagination uses a
<nav>element witharia-label="Pagination" - Active page button has
aria-current="page" - Disabled previous/next buttons have
aria-disabled="true" - Ellipsis elements use
aria-hidden="true"as they are decorative - Previous/Next buttons have descriptive
aria-labelattributes
Do’s & Don’ts
Do
- Always pair Pagination with a data table or list
- Show the total count of items alongside the pagination control
- Use
siblingCount={2}for very large datasets (100+ pages) - Keep the Pagination at the bottom of the data, aligned to the right
Don't
- Don’t use Pagination for fewer than 2 pages — hide it entirely
- Don’t change
totalPagesduring interaction unless data has changed - Don’t place Pagination above the data — users expect it at the bottom
- Don’t use Pagination when infinite scroll is more appropriate for the UX