brijr/ui

Lab

Pagination

npx shadcn@latest add @brijr/pagination

Default content

PaginationContent with no children renders Previous, a link for each page with an ellipsis for each gap, and Next. Pass children to arrange the parts yourself, as the sections below do.

<PaginationContent />
<PaginationContent /> · getHref · defaultPage={5}

Page count

Click the pages: the current link takes the outline look and the range slides.

pageCount={5}
pageCount={20} · defaultPage={10}
pageCount={1}

Ends

At an end, Previous and First (or Next and Last) are disabled but stay focusable.

first page active
last page active
PaginationFirst · PaginationLast · middle

Range

siblings={2}
boundaries={2}
pageCount={250} · three-digit pages

Parts

getHref renders every part as an anchor; without it they are buttons.

getHref · links
pages only · no steps
custom step children
PaginationLink size="icon-sm"