Atelier UI

Search components…

Search components…

Pagination

Pagination with smart ellipses, first / last buttons, page-size select and a result summary.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

PaginationProps

Also accepts all props of Omit<React.ComponentProps<"nav">, "onChange">

PropTypeDefaultDescription
totalItems* requirednumber——
pagenumber——
defaultPagenumber——
onPageChange(page: number) => void——
pageSizenumber——
defaultPageSizenumber——
pageSizeOptionsnumber[]—Show a page-size select when non-empty
onPageSizeChange(size: number) => void——
siblingCountnumber—Pages shown on each side of the current page
showFirstLastboolean——
showSummaryboolean—"Showing 1–10 of 240" summary text
variant"outline" | "ghost"——

Install

$ npx shadcn@latest add https://chromotion.dev/r/pagination.json

The CLI installs the base component; your customizations live in the code generated on the Customize tab.

More like this