Pagination
Page buttons with prev/next and ellipses.
Code
import * as React from 'react';
import { Pagination } from '@fruit-labs/design';
export default function Demo() {
return <Pagination pageCount={12} defaultPage={5} />;
}Install
From npm:
npm install @fruit-labs/design
import { Pagination } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/pagination.jsonGuidelines
- Pair with "Showing 1–20 of 340" text in table footers.
Props
| Prop | Type | Required |
|---|---|---|
label | string | No |
pageCount | number | Yes |
page | number | No |
defaultPage | number | No |
onChange | (page: number) => void | No |
className | string | No |