Pagination
Pagination with page navigation, next and previous links.
<Pagination>...</Pagination>
Pagination — nav des pages d'une liste. Une seule PaginationLink porte isActive. PaginationPrevious/Next et PaginationEllipsis pour les extrémités et les gaps.
Installation
$ bext ui add pagination
Copy and paste the following into src/components/ui/pagination.tsx.
<Pagination>...</Pagination>
Usage
Anatomy
<Pagination>
└── <PaginationContent> // <ul>
├── <PaginationItem><PaginationPrevious href="?p=1" /></PaginationItem>
├── <PaginationItem><PaginationLink isActive href="?p=2">2</PaginationLink></PaginationItem>
├── <PaginationItem><PaginationEllipsis /></PaginationItem>
└── <PaginationItem><PaginationNext href="?p=3" /></PaginationItem>
</Pagination>API Reference
Pagination
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Wrapper |
PaginationContent
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | undefined |
PaginationItem
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | undefined |
PaginationLink
| Prop | Type | Default | Description |
|---|---|---|---|
| href | string | — | undefined |
| isActive | boolean | — | aria-current="page" + variant outline. |
| size | "icon" | "default" | "icon" | undefined |
| children | ReactNode | — | undefined |
PaginationPrevious / PaginationNext
| Prop | Type | Default | Description |
|---|---|---|---|
| href | string | — | undefined |
PaginationEllipsis
| Prop | Type | Default | Description |
|---|
Accessibility
Le nav porte aria-label="pagination". La page active porte aria-current="page". PaginationEllipsis a aria-hidden + un span visuellement caché "More pages".
Edit this component live in the bext playground. The PRISM + signals version is the bext-native idiom — fine-grained reactivity, no virtual DOM.
Pure PRISM + real bext signals — fine-grained, no re-render.
The React idiom — same UI, for comparison.
On This Page