Import
Usage
Basic Pagination
Variants
Pagination supports two main variants:Numbered Pagination (default)
Simple Pagination
Sizes
Three sizes are available:Navigation Options
With Previous/Next Buttons
With First/Last Buttons
Sibling Count
Control how many page numbers to show on each side of the current page:Examples
Basic Data Table Pagination
With API Data Fetching
Compact Mobile Layout
Full-Featured Pagination
Props
The display style. Options:
numbered (shows page numbers), simple (shows “Page X of Y”).The currently active page number (1-indexed).
The total number of pages available.
The size of pagination controls. Options:
sm, md, lg.Callback function called when the user navigates to a different page. Receives the new page number.
Whether to show previous and next navigation buttons.
Whether to show first and last page buttons. Only applies to numbered variant.
Number of page buttons to show on each side of the current page. Only applies to numbered variant.
Additional CSS classes to apply to the pagination container.
Components
The Pagination component also exports sub-components for custom implementations:PaginationItem
Individual page button component:PaginationItem Props
Button style. Options:
default, ghost, outline.Button size. Options:
sm, md, lg.Whether this page is currently active.
PaginationEllipsis
Ellipsis indicator for hidden pages:Pagination Logic
The component includes ausePagination hook that intelligently displays page numbers:
- Shows all pages when total pages fit in the available space
- Adds ellipsis (
...) to indicate hidden pages - Always shows first and last page numbers when there are many pages
- Displays sibling pages around the current page based on
siblingCount
Examples:
Few pages (all shown):1 2 3 4 5
Current page near start:1 2 3 4 5 ... 20
Current page in middle:1 ... 8 9 10 11 12 ... 50
Current page near end:1 ... 16 17 18 19 20
Semantic Tokens
Pagination uses the following semantic tokens from the Stride Design System:--button-height-sm,--button-height-md,--button-height-lg--spacing-xs,--spacing-sm,--spacing-md,--spacing-lg--font-size-sm,--font-size-md,--font-size-lg--radius-sm,--radius-md,--radius-lg--text-primary,--text-secondary--bg-primary,--bg-tertiary--border-primary,--border-secondary,--border-focus--interactive-primary,--interactive-primary-text--interactive-ghost-hover--transition-fast
Accessibility
- All buttons have descriptive
aria-labelorsr-onlytext for screen readers - Previous/Next buttons include “Go to previous page” / “Go to next page” labels
- Ellipsis has “More pages” label for screen readers
- Current page button uses
isActivestate for visual indication - Focus visible outlines on all interactive elements
- Disabled states for previous button on first page and next button on last page
- Keyboard navigation supported (Tab to focus, Enter/Space to activate)
- Buttons meet minimum touch target size (44x44px) on all sizes