Skip to content

Pagination

Shows which rows are visible and moves between pages.

import { Pagination } from '@/design-system';

Examples

1–10 of 42

'use client';

import { useState } from 'react';
import { Pagination } from '@/design-system';

export default function PaginationBasic() {
  const [page, setPage] = useState(0);

  return <Pagination page={page} pageSize={10} total={42} onChange={setPage} />;
}

How it works

  • It only counts and reports. Slice your rows yourself.
  • If filtering can shrink the list, keep page within range before passing it in.
  • The row count is announced politely when it changes.
  • Its buttons are secondary buttons and follow the button tokens.

Props

Pagination takes only these props.

Pagination props
PropTypeDefaultDescription
pagenumberrequiredThe current page, counted from zero.
pageSizenumberrequiredRows on each page.
totalnumberrequiredRows in all.
onChange(page: number) => voidrequiredCalled with the page to show.
classNamestring—Extra classes, for spacing or width. Utility classes override the component’s own styles.