Pagination

Page numbers as joined cells, so a run of them reads as one control.

pulls inlucide-react@afterglow/button

Installation

npx shadcn@latest add @afterglow/pagination

Composition

Component structure.

Pagination
└── PaginationContent
    └── PaginationItem
        ├── PaginationLink
        ├── PaginationPrevious
        ├── PaginationNext
        └── PaginationEllipsis

API Reference

isActive sets aria-current="page" as well as the styling, so the current page is announced and not only drawn.

PropTypeDefault
isActivebooleanfalse
size"default" | "sm" | "lg" | "icon" | "icon-sm""icon"