shadcn.io is not affiliated with official shadcn/ui
Pagination examples · Navigation
With First and Last Pagination for React
First, Previous, the current page, Next and Last in one row.
First and Last at the ends, Previous and Next beside the current page, page 5. People can step one page or jump to either end. Use it for long lists where page numbers would take too much room.
Preview
Installation
FAQ
What order are the controls in?
First, PaginationPrevious, page 5, PaginationNext, Last, each in its own PaginationItem.
How do First and Last fit their words?
They are PaginationLinks with size="md", the size Previous and Next use, instead of the default square page size.
How is the current page marked?
isActive on page 5 gives it the outline style and aria-current="page". The other controls are ghost links.
How do I change the Previous and Next words?
Pass text. The defaults are Previous and Next, and the accessible names are Go to previous page and Go to next page. The word is hidden below the sm breakpoint, where only the chevron shows.
Related
- First and Last PaginationFirst and Last links on either side of
- With Previous and Next PaginationThree page numbers between Previous and
- Complete PaginationPagination with Previous and Next, the
- With Page Counter PaginationPrevious and Next around a Page 2 of 10
- Previous and Next Only PaginationOnly Previous and Next buttons, for
- Both Ellipsis PaginationPagination on page 6 of 20, with an