Previous and next pagination with current position and optional total.
First pageMiddle pageLast page
<Pager page={2} pageCount={8} total={143} />Installation
pnpm add @chanrg/4uiImport the stylesheet once, at the root of your app:
import '@chanrg/4ui/styles.css';Usage
import { Pager } from '@chanrg/4ui';<Pager page={2} pageCount={8} total={143} />API reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Current page. |
pageCount | number | 1 | Total pages. |
CSS variables
| Variable | Description |
|---|---|
--4ui-surface | Primary component surface. |
--4ui-text | Primary foreground color. |
--4ui-border | Default control and panel border. |
Accessibility
- Uses a labelled pagination navigation landmark.