Pagination
Page navigation with numbered links, first/last jumps, pill and compact layouts, and three active treatments — wired to state or real URLs.
Installation#
pnpm dlx shadcn@latest add @davinciui/paginationUsage#
Composition#
Use the following composition to build a Pagination:
Pagination
└── PaginationContent
├── PaginationItem
│ ├── PaginationFirst
│ ├── PaginationPrevious
│ ├── PaginationLink
│ ├── PaginationNext
│ └── PaginationLast
└── PaginationEllipsisAPI Reference#
| Prop | Type | Default |
|---|---|---|
Pagination · variantPill renders a floating bordered bar. | "default" | "pill" | "default" |
PaginationLink · variantActive-page treatment: ring, filled, or tonal. | "outline" | "solid" | "ghost" | "outline" |
PaginationLink · isActiveCurrent page with aria-current. | boolean | false |
PaginationLink · sizeicon-sm/icon for compact rows. | Button sizes | "icon" |
PaginationPrevious · textLabel, collapsed on small screens. | string | "Previous" |
PaginationNext · textLabel, collapsed on small screens. | string | "Next" |
showTextRender the Previous/Next label. | boolean | true |
PaginationFirst / LastJump to the first/last page. | Component | — |
PaginationEllipsisSkipped-range indicator, aria-hidden. | Component | — |
classNameAdditional CSS classes. | string | — |
Accessibility#
A nav with aria-label pagination holds Button elements; the active link sets aria-current page, edge controls carry descriptive aria-labels, and the ellipsis is aria-hidden with sr-only More pages. Keyboard behavior comes from native buttons.
Motion#
Static layout primitives with no animation of their own. Only the shared Button styles provide short hover and focus color transitions, and this file implements no reduced-motion handling.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

