shadcn.io is not affiliated with official shadcn/ui
Pagination examples · Sizes
Spacious Pagination for React
Three page numbers spread apart with a wide gap.
Three page numbers with page 2 current and a wide gap between them. More space makes each number an easier target and gives the row a calmer look on landing pages and blogs.
Preview
Installation
FAQ
Where does the wide spacing come from?
PaginationContent has className="gap-3". That class is the whole difference from a plain row of the same three links.
What does the row render?
Three PaginationLinks, for pages 1, 2 and 3. Page 2 has isActive. There is no PaginationPrevious or PaginationNext.
How is the current page marked?
isActive uses the outline variant and sets aria-current="page" on page 2. Pages 1 and 3 stay ghost. Move isActive to change the current page.
How do I link the three numbers?
Each href is #. Set it to that page's URL. Pagination is a nav labeled "pagination".
Related
- Compact PaginationThree page numbers packed close together
- Default Size PaginationPagination at the default size, with
- Large Size PaginationPagination with large page buttons and a
- Basic Button GroupThree rows of outline buttons joined into
- Many Pages PaginationTen page numbers in a row with page 5 as
- Small Size PaginationPagination with small page buttons and a