DocsComponentsTemplatesThemesGitHub

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

Guidelines

  • Pair with "Showing 1–20 of 340" text in table footers.

Props

PropTypeRequired
labelstringNo
pageCountnumberYes
pagenumberNo
defaultPagenumberNo
onChange(page: number) => voidNo
classNamestringNo

Edit this example on GitHub