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
pagewithin 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.
| Prop | Type | Default | Description |
|---|---|---|---|
page | number | required | The current page, counted from zero. |
pageSize | number | required | Rows on each page. |
total | number | required | Rows in all. |
onChange | (page: number) => void | required | Called with the page to show. |
className | string | — | Extra classes, for spacing or width. Utility classes override the component’s own styles. |