Pagination Examples
19 page navigation rows: page numbers, Previous and Next, ellipsis truncation, First and Last, page counters, disabled ends, and small to large sizes. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every pagination example
19 examples.
- Both EllipsisAdvancedPage 6 of 20, with Previous, page 1, an ellipsis, pages 5 to 7, another ellipsis, page 20, and Next.

- CompactSizesPages 1, 2, and 3 sit in a tight row with page 2 current. There is no Previous button and no Next button.

- Complete PaginationBasicPrevious and Next around pages 1 to 3, with page 2 current, an ellipsis, and a link to page 10.

- Default SizeSizesPrevious, pages 1 to 3 with page 2 current, and Next, at the default button size and the default spacing.

- Disabled StateAdvancedPage 1 is current, Previous is faded and left out of the tab order, and pages 2, 3, and Next still work.

- End EllipsisAdvancedNear the start of a 10 page list: Previous, pages 1 to 3 with page 2 current, an ellipsis, page 10, and Next.

- First and LastNavigationA First link, page 5 marked current, and a Last link, with no Previous or Next in the row.

- Five Page NumbersBasicPages 1 through 5 in one row, with page 3 marked current, and no Previous, Next, or ellipsis.

- Large SizeSizesPrevious, pages 1 to 3 with page 2 current, and Next, at the large button size with a wider gap.

- Many PagesAdvancedPages 1 through 10 in one row, with page 5 marked current, and no Previous, Next, or ellipsis.

- Previous and Next OnlyNavigationOnly a Previous button and a Next button, with no page numbers and no current page on screen.

- Simple Page NumbersBasicThree page links, 1 to 3, with page 2 current and the default gap. There is no Previous and no Next.

Or describe it. With Pro, your AI agent installs the pagination example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Pagination examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
Pagination is the row of page links under a long list, table or set of search results: Previous, page numbers with an ellipsis for long ranges, and Next. It's shadcn.io's Pagination component, built on Base UI, React Aria, Ark UI and Radix UI for React, and on Ark UI for Vue, Svelte and Solid, and styled with Tailwind CSS: a labeled nav around a list of `PaginationLink`s, with `PaginationPrevious`, `PaginationNext` and `PaginationEllipsis`. Each example is one small file.
Yes. Every pagination example is free to use in personal and commercial projects, with no attribution required. Seeing the code and installing an example takes a free shadcn.io account.
Paginate when people need to jump to a page, come back to the same place, or share a link to it, and when search engines should index each page: search results, tables, archives. Infinite scroll suits feeds people browse without a goal. A Load more button is the middle ground.
On the client, you load every row once and show a slice per page: fast page changes, but a large first load, fine for a few hundred rows. On the server, each page asks the backend for its slice: it scales to any size at the cost of a request per page. Use the server for lists that keep growing.
Keep the first page, the last page and the current page's neighbors, and put a `PaginationEllipsis` in each gap: 1 … 5 6 7 … 20. The start, end and both-ellipsis examples show each position. On Ark UI, Vue, Svelte and Solid, Pagination can compute the row for you from `count`.
Disable it, or leave it out. The disabled-state example keeps Previous in the row, faded and out of the tab order, so the row doesn't shift between pages. Do the same for Next on the last page.
Put a short text between Previous and Next, as the page counter example does with Page 2 of 10. Above a table, a line such as Showing 11 to 20 of 247 results tells people more than the page number alone.
Sign in with a free account, then copy the code or run the install command on the example's page. It adds the example and the Pagination component, with the Button it builds on, to your project if you don't have them yet.
Give every link the URL of its page, such as `?page=3`, and read the page from the URL when the list renders. Links then work with the back button, open in new tabs and can be shared, and the server can render the right slice.
Render the row from the table's state: mark the current page with `isActive`, disable Previous and Next when the table can't go further, and change the table's page when a link is chosen. With a data fetching library, include the page in the query key so each page is cached on its own.
The Pagination component, the Button it styles its links with, Tailwind CSS and Lucide icons for the chevrons and the ellipsis. There is no state in the examples: the current page is marked by hand.
Yes. `Pagination` renders a nav labeled pagination around a list of links. The current page carries `aria-current="page"`, Previous and Next are named Go to previous page and Go to next page, the ellipsis is hidden from assistive tech, and a disabled end carries `aria-disabled`.
Yes. The examples are links with no state, so on React they render as Server Components; read the page from the URL on the server and render the row around it.
4.9 out of 5 from 150+ developers
Every pagination example. One prompt away.
Every pagination example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro
















