The Pagination component provides navigation for paginated content. Built with accessibility in mind, it includes previous/next buttons, page numbers, and ellipsis for large page sets. Perfect for tables, search results, and content lists.
Basic Usage
With Ellipsis
Disabled States
Large Page Set
1 More pages 4 5 6 More pages 20
Interactive Example
Properties
Property Type Description classNamestringAdditional CSS classes for the pagination container. childrenReactNodePagination content (typically PaginationContent).
Property Type Description classNamestringAdditional CSS classes for the content container. childrenReactNodePagination items.
Property Type Description classNamestringAdditional CSS classes for the item container. childrenReactNodeItem content (links, buttons, ellipsis).
Property Type Description isActivebooleanWhether this page is currently active. disabledbooleanWhether the link is disabled. onClick() => voidClick handler for the page link. classNamestringAdditional CSS classes. childrenReactNodeLink content (usually page number).
Property Type Description disabledbooleanWhether the previous button is disabled. onClick() => voidClick handler for previous navigation. classNamestringAdditional CSS classes.
Property Type Description disabledbooleanWhether the next button is disabled. onClick() => voidClick handler for next navigation. classNamestringAdditional CSS classes.
Property Type Description classNamestringAdditional CSS classes for the ellipsis.
Accessibility
The Pagination component includes comprehensive accessibility features:
Keyboard Navigation - Full keyboard support with arrow keys and Enter
Screen Reader Support - Proper ARIA labels and navigation landmarks
Focus Management - Clear focus indicators and logical tab order
Active State - Clear indication of current page with aria-current="page"
Disabled States - Proper handling of disabled navigation buttons
Semantic HTML - Uses proper navigation and list elements
Common Use Cases
The Pagination component is perfect for:
Data Tables - Navigate through large datasets and table rows
Search Results - Browse through search result pages
Product Listings - Navigate e-commerce product catalogs
Blog Posts - Browse through article archives and categories
User Lists - Navigate through user directories and member lists
Content Galleries - Browse through image and media galleries
API Results - Handle paginated API responses and data feeds
Best Practices
Show Current Context - Always indicate current page and total pages
Disable Appropriately - Disable previous on first page, next on last page
Use Ellipsis Wisely - Show ellipsis when there are many pages to navigate
Provide Shortcuts - Include first/last page links for large page sets
Mobile Optimization - Consider compact layouts for smaller screens
Loading States - Show loading indicators during page transitions
URL Synchronization - Keep pagination state in sync with browser URL
Performance - Implement efficient data loading and caching strategies