Skip to content
Menus & Navigation

Pagination

Server Component

Navigate 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.

PortedParity: MatchGeometry 2/2Pixel diff 0 pxLogic 2/2Parity scoreboard
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

Skip PaginationLabels props table
PropTypeDefaultDescription
nav*
string—Accessible name of the pagination landmark.
previous*
string——
previousAria*
string——
next*
string——
nextAria*
string——
morePages*
string——

PaginationProps

Extends HTMLAttributes<HTMLElement>

Skip PaginationProps props table
PropTypeDefaultDescription
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>

Skip PaginationLinkProps props table
PropTypeDefaultDescription
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>

Skip PaginationContentProps props table
PropTypeDefaultDescription
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>

Skip PaginationItemProps props table
PropTypeDefaultDescription
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>

Skip PaginationPreviousProps props table
PropTypeDefaultDescription
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>

Skip PaginationNextProps props table
PropTypeDefaultDescription
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>

Skip PaginationEllipsisProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.