Haedong
034

Pagination

Navigation

Page 1 of 12

Customize

Pages

Code

<Pagination page={page} count={12} onPageChange={setPage} />

Install

npx shadcn@latest add https://components.haedong.dev/r/pagination.json

Props

Controlled: pass page and handle onPageChange. Neighbors within siblings of the current page plus the first and last are shown; gaps collapse to ….

PropTypeDescription
page / countnumberCurrent page (1-based) and total pages.
onPageChange(page: number) => voidCalled from the numbers and arrows.
siblingsnumberNumbers shown on each side of the current page. Defaults to 1.