This component requires the FyskProvider. See Quick Start →
Preview
StatefulPagination
TypeScript
Installation
bash
bash
Usage
tsx
tsx
Examples
Default
Standard manually composed pagination.
Component
TypeScript
Stateful Pagination
Automatically handles ellipses, page math, and first/last buttons.
Component
TypeScript
Features
Stateful Helper:
StatefulPaginationcomponent handles all logic for calculating page ranges and showing ellipses.Glass Variant: Includes a Polished
glassvariant designed for dark backgrounds and modern UIs.Minimal Style: A borderless
minimalvariant for a cleaner, less intrusive look.Custom Shapes: Toggle between
circle,square, androundedshapes.
Props
Pagination
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "glass" | "minimal" | "default" | The visual style of the pagination items. |
shape | "circle" | "square" | "rounded" | "circle" | Internal shape of the page links. |
size | "sm" | "md" | "lg" | "md" | Visual size of the items. |
StatefulPagination
| Prop | Type | Default | Description |
|---|---|---|---|
total | number | - | Total number of items across all pages. |
page | number | - | The current active page (1-indexed). |
pageSize | number | 10 | Items per page. |
siblingCount | number | 1 | Number of page buttons to show on each side of current page. |
onChange | (page: number) => void | - | Callback when page changes. |
showFirstLast | boolean | false | Shows buttons to jump to the very first/last pages. |
Accepts all standard HTML attributes.