Pagination

Page numbers with a gliding bubble and smart ellipses.

no dependenciesMIT · free

Installation

npx shadcn@latest add https://ombakui.com/r/pagination.json

Usage

import { Pagination } from "@/components/pagination";

<Pagination total={12} page={page} onChange={setPage} />

Props

PropTypeDefaultDescription
total*number–Total number of pages.
pagenumber–Current page, 1-based (controlled).
defaultPagenumber1Starting page when uncontrolled.
onChange(page: number) => void–Called with the new page.
siblingsnumber1Pages shown on each side of the current one before ellipses.
classNamestring–