Pagination
Server ComponentNavigate between pages.
Import
tsx
import { Pagination } from "@cronus-ui/ui";
bash
npx cronus-ui add pagination
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component PaginationDefault layout:inline style:pagination {
total:5
current:2
label "default"
}
page "/audit/pagination/default" type:custom {
use PaginationDefault
}
many.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component PaginationMany layout:inline style:pagination {
total:10
current:5
label "many"
}
page "/audit/pagination/many" type:custom {
use PaginationMany
}
API Reference
Generated from the component's exported types.
PaginationLabels
| Prop | Type | Default | Description |
|---|---|---|---|
nav* | string | — | Accessible name of the pagination landmark. |
previous* | string | — | — |
previousAria* | string | — | — |
next* | string | — | — |
nextAria* | string | — | — |
morePages* | string | — | — |
PaginationProps
Extends HTMLAttributes<HTMLElement>
| Prop | Type | Default | Description |
|---|---|---|---|
labels | Partial<PaginationLabels> | — | Override default English strings. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
PaginationLinkProps
Extends AnchorHTMLAttributes<HTMLAnchorElement>
| Prop | Type | Default | Description |
|---|---|---|---|
isActive | boolean | — | — |
size | PaginationLinkSize | — | Control size. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
PaginationContentProps
Extends HTMLAttributes<HTMLUListElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
PaginationItemProps
Extends HTMLAttributes<HTMLLIElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
PaginationPreviousProps
Extends ComponentProps<typeof PaginationLink>
| Prop | Type | Default | Description |
|---|---|---|---|
isActive | boolean | — | — |
size | string | — | Control size. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
PaginationNextProps
Extends ComponentProps<typeof PaginationLink>
| Prop | Type | Default | Description |
|---|---|---|---|
isActive | boolean | — | — |
size | string | — | Control size. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
PaginationEllipsisProps
Extends HTMLAttributes<HTMLSpanElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |