Pagination for navigating between pages. Supports Numeric and Text types, configurable placement, mobile layout, and RTL.
Loading demo: pagination-real-world
npx sdaia-ui@latest add pagination
import { Pagination } from '@/components/ui/Pagination';<Pagination type="numeric" placement="center" />Pagination with numbered page buttons.
Loading demo: pagination-numeric
Pagination with previous and next text labels instead of numbers.
Loading demo: pagination-text
Pagination aligned to the start, center, or end of its container.
Loading demo: pagination-placement
Compact pagination layout optimised for mobile screens.
Loading demo: pagination-mobile
Props for the Pagination component.
Prop | Type | Default | Required |
|---|---|---|---|
type | 'numeric' | 'text' | 'button' | "numeric" | optional |
placement | 'start' | 'center' | 'end' | "start" | optional |
mobile | boolean | false | optional |
rtl | boolean | false | optional |
page | number | mobile ? 2 : 3 | optional |
totalPages | number | mobile ? 8 : 12 | optional |
onPageChange | (page: number) => void | - | optional |
fullWidth | boolean | false | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Previous and next buttons with up to seven page numbers. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Wraps to a new line when it doesn't fit. Set mobile to show fewer page numbers (up to four) in a narrower bar; it does not switch on its own. |