Tabs
Switch between related views in place.
Page navigation with previous, next, page numbers and ellipsis.
Previous, page numbers, ellipsis, Next. Optional first and last, rows per page and a status for table footers. Kit Buttons and Select. Not ButtonGroup.
Controlled page 2 of 10, medium size. Click pages or Previous/Next to change page.
Page tables, long lists, and search results. Sits below a Table or DataTable. Not ButtonGroup. Not Tabs. Do not invent cousins.
Page navigation with previous, next, page numbers, and ellipsis, plus optional first/last, a rows-per-page Select and a page or results status for table footers. Not ButtonGroup. Not Tabs.
import { Pagination } from "agentic-ds-kit";From contracts/pagination.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| compact | boolean | No | false | Narrow layout for small screens: icon-only Previous and Next ("Previous page", "Next page") around a "2 of 10" status. Ignores showPages, showLabels, showFirstLast, status and the page-size picker. The default layout wraps instead of overflowing. For an automatic switch use collapse="narrow". |
| page | number | No | — | controlled 1-based. Controlled when page is a number. |
| defaultPage | number | No | 1 | uncontrolled initial page |
| pageCount | number | Yes | — | >= 1 |
| onPageChange | function | No | — | (page: number) => void |
| showPages | boolean | No | true | false shows Previous/Next only (icons-only when showLabels is also false) |
| showLabels | boolean | No | true | Previous / Next text next to chevrons. Icon-only uses ariaLabel. |
| showPreviousNext | boolean | No | true | false hides Previous/Next (Simple: page numbers only) |
| size | sm | md | No | md | passed to kit Button |
| showFirstLast | boolean | No | false | Icon-only ghost Buttons (ChevronsLeft, ChevronsRight) outside Previous and Next, named "First page" and "Last page". Disabled on the first and last page. |
| pageSizeOptions | array | No | — | Shows "Rows per page" and a kit Select of these sizes, e.g. [10, 25, 50], at the start of the row. Omit for no picker. |
| pageSize | number | No | — | The current page size. Controlled: the parent recomputes pageCount. Also used by status="range". |
| onPageSizeChange | function | No | — | (pageSize: number) => void. After it, Pagination calls onPageChange(1) (and resets an uncontrolled page to 1), because a new size reflows every page. |
| status | none | page | range | No | none | Text at the start of the row. page: "Page 2 of 10". range: "26–50 of 240", needs totalCount and pageSize, and falls back to page without them. |
| totalCount | number | No | — | Total number of rows, for status="range". 0 shows "0 of 0". |
| collapse | never | narrow | No | never | narrow: under 480px of container width (the same as Table stack) the nav shows the compact layout. The nav becomes an inline-size container, so give it a width (block flow, not a shrink-to-fit parent). compact wins when both are set. |
Switch between related views in place.
Joined row of kit Buttons that share one size and act as one control cluster.
Clickable action control with appearance × mode (plus an optional flat set) and a fixed set of sizes.
Choose one or several options from a list.