Pagination
moleculesPage controls for long lists: page mode (bind:page + pageCount) or offset mode (bind:offset + limit + total), with edges, siblings, a range readout and a compact collapse.
Audit log
offset mode: bind:offset with limit and total slices the rows; showRange prints "from–to / total".
- 2026-10-21 09:00 @amara signed in
- 2026-10-21 10:07 @jun invited a member
- 2026-10-21 11:14 @lena exported a report
- 2026-10-21 12:21 @mateo deployed worker-02
- 2026-10-21 13:28 @priya changed a cap
Sizes and shape
size="sm" | "md" | "lg"; siblings widens the window around the current page; showEdges={false} drops first and last; block fills the row.
States
a single page disables both arrows; an empty result set reads "0–0 / 0"; under 24rem of container width the numbers collapse to a range.
Pages as links
href={(page) => string} renders every page and the prev/next controls as real links with aria-current="page"; urlState keeps the ?page= param, so the page survives a reload and middle-click opens it in a new tab.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
page bindable | number | 1 | 1-based current page. |
pageCount | number | — | |
offset bindable | number | — | Offset mode: 0-based index of the first item; needs `limit` + `total`. |
limit | number | — | |
total | number | — | |
onchange | (page: number) => void | — | |
href | (page: number) => string | — | Pages become real links (`<a aria-current="page">`): middle-click opens a page in a new tab. |
siblings | number | 1 | Numbered pages shown on each side of the current one. |
showEdges | boolean | true | Always show the first and last page. |
showRange | boolean | false | Show "1–20 / 412" (offset mode) or "3 / 12" next to the buttons. |
size | ControlSize | 'md' | |
grow | boolean | false | Fill the free space of a flex row (`flex: 1 1 0`). |
shrink | boolean | true | `false` pins the box (`flex: none`) so a flex row cannot squeeze it. |
block | boolean | false | Full-width block. |
label | string | 'Pagination' | |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
class | string | '' |