shadcn.io is not affiliated with official shadcn/ui
Pagination examples · Sizes
Default Size Pagination for React
Pagination at the default size, with Previous, three page numbers and Next.
Previous, pages 1 to 3 with page 2 current, and Next at the component's default size and spacing. Compare it with the small, large, compact and spacious versions.
Preview
Installation
FAQ
Which size does this pagination use?
The file passes no size and no height class. PaginationLink defaults to size="icon-md". PaginationPrevious and PaginationNext pass size="md".
What is in the row?
PaginationPrevious, links for 1, 2 and 3, and PaginationNext. Page 2 has isActive, so it is the outline link with aria-current="page".
How is the gap chosen?
PaginationContent has no gap-* class in this file. The gap comes from the cn-pagination-content style, which is gap-0.5 in some styles and gap-1 in others.
How do I point Previous, the numbers, and Next at real URLs?
Every href is #. Set href on PaginationPrevious, each PaginationLink, and PaginationNext to that page's URL.
Related
- Small Size PaginationPagination with small page buttons and a
- Large Size PaginationPagination with large page buttons and a
- Start Ellipsis PaginationPagination near the end, with an ellipsis
- Disabled State PaginationPagination on the first page, with
- Basic Data Table with CheckboxesA table of products with a checkbox on
- Compact PaginationThree page numbers packed close together