Pagination

Installation

$npx shadcn-macos@latest add pagination

Examples

Props

<Pagination />
PropTypeDefaultDescription
page*number—Current active page (1-based).
totalPages*number—Total number of pages.
onPageChange*(page: number) => void—Called when the user selects a different page.
siblingCountnumber1How many page numbers to show on each side of the current page.
classNamestring—Custom CSS class names.