Overview
Pagination provides semantic page navigation controls with composable sub-components for building custom pagination UIs.
- Use it for multi-page data display (tables, lists, search results).
- Do not use it as a stepper or wizard navigation.
<nav aria-label="pagination"> element with centered flex layout.
Installation
Import
Basic Example
Advanced Example
Size Scale
Pagination supports xs | sm | md | lg | xl sizing that cascades to all sub-components.
API Reference
Pagination
Root navigation container with centered layout.Size of the pagination:
xs | sm | md | lg | xl.PaginationContent
Flexible list container for pagination items.Size override for the content.
PaginationItem
Wrapper for individual pagination elements.Size override for the item.
PaginationLink
Page number link with active state support.Visual style:
icon uses ActionIcon, default uses Button.Whether this page is the current page.
Size override for the link.
PaginationPrevious
Previous page navigation link with arrow icon.URL for the previous page.
Size override for the previous button.
PaginationNext
Next page navigation link with arrow icon.URL for the next page.
Size override for the next button.
PaginationEllipsis
Visual indicator for skipped pages.Size override for the ellipsis.
Accessibility
- Use
aria-labelon Previous/Next links to clarify direction. - Mark the current page with
isActiveandaria-current="page". - Ensure keyboard navigation works for all interactive elements.
SSR and RSC Notes
- Pagination markup is server-friendly and works in RSC.
- Compute page ranges on the server and render static links.
- Use client boundaries only when pagination requires client-side state management.
Styling and Tokens
- Default styles use semantic tokens (
bg-background,text-foreground,border-border). - Active state uses
outlinevariant for emphasis. - Keep pagination controls visually distinct but not overwhelming.
Troubleshooting
- Current page not highlighted: ensure
isActiveis set totrueon the currentPaginationLink. - Previous/Next links not working: verify
hrefprops are set correctly. - Ellipsis creates confusion: use ellipsis sparingly and provide clear page ranges.