<!-- generated by scripts/gen-docs.mjs from docs/system/pagination.md. Edit the source and rerun. -->
# Pagination

## Description
Moves through a list a page at a time and says which items are on screen.

`import { Pagination, pageSlots } from "@/components/cobalt/ui/pagination"`, source `registry/cobalt/ui/pagination.tsx`, status `ready-with-gaps`.
`import { ListBody } from "@/components/cobalt/ui/list-body"`, source `registry/cobalt/ui/list-body.tsx`, status `ready-with-gaps`.
Foundation: `hand-rolled on a nav with buttons or links`, with ListBody hand-rolled on a `div`. Traps checked: `trap/current-unmarked`, `trap/link-as-button`, `trap/numbers-shift`, `trap/weight-shift`, `trap/control-height`, `trap/narrow-hidden-nav`, `trap/disabled-still-hovers`, `trap/button-icon-name`, `trap/focus-ring-shape`, `trap/list-dead-gap`, `trap/touch-hover-flash`, `trap/loading-layout-shift`, `trap/reduced-motion-ignored`, `trap/motion-layout-property`, `trap/color-only-status`, `trap/live-region-double`, `trap/motion-blocks-input` (n/a: the dimmed rows refuse the pointer on purpose, and the fade takes 150ms), `trap/loader-small-dots` (n/a: ListBody draws no loader).

Where each trap is answered: `trap/current-unmarked`, the current page carries `aria-current="page"` and the grey fill; `trap/link-as-button` in `rule/pagination-links-for-addresses`, a page in the address is a link and a page in state is a button; `trap/numbers-shift`, every figure is tabular and the position line holds the width of its longest wording, so Previous and Next never move (measured over 12 pages); `trap/weight-shift`, the current page keeps its weight; `trap/control-height`, each step is 36px; `trap/narrow-hidden-nav` in States, under 512px of room the numbers give way to the count line, or to "Page 3 of 33" when the count is hidden, instead of running off the edge; `trap/disabled-still-hovers`, a disabled end has no hover fill; `trap/button-icon-name`, under 384px Previous and Next show only their chevrons and keep their names through `aria-label`; `trap/focus-ring-shape`, the shared outline follows the 10px corner, with 4px between steps; `trap/list-dead-gap`, the 4px between steps is the only gap; `trap/touch-hover-flash`, the hover fill is guarded by `(hover: hover)`; `trap/loading-layout-shift` in `rule/pagination-keep-the-place`, the old rows stay at their size while the next page loads; `trap/reduced-motion-ignored` and `trap/motion-layout-property` in Motion, the dim is an opacity fade that stays under reduce; `trap/color-only-status` in `rule/list-body-pair-with-the-cause`, the control that caused the wait shows it in words or a spinner; `trap/live-region-double`, the rows wrapper carries `aria-busy` and no live region.

### Foundation
Not applicable: hand-rolled. Base UI has no pagination part; this follows the pagers both source apps built (`docs/research/2026-10-17-coverage.md`, row 8).

| Given by the foundation | Added by the team |
|---|---|
| A native `<nav>` with a list of native `<button>`s, or links through `RenderLink` from `registry/cobalt/lib/link.tsx` | `pageSlots`, which keeps the number row 7 places long from page to page, the first and last pages always in it and a gap only for two pages or more, and keeps the row on screen when the page pressed is already in it beside a neighbour, so the number pressed never slides under the pointer (it moved 40px left when the row re-centred before, `registry/cobalt/ui/pagination.tsx:29`); cursor pages with no `total`, Previous and Next with "41 to 60" and Next off once `hasMore` is false (`registry/cobalt/ui/pagination.tsx:172`); the prefetch seam on page links (`registry/cobalt/ui/pagination.tsx:233`); the summary "1 to 40 of 1,284" through `integer` from `registry/cobalt/lib/format.ts`; the current page in the grey fill with `aria-current="page"`; Previous and Next disabled at the ends, as a `span` with `aria-disabled` in link mode, and still taking the pointer (`cursor-default`, no `pointer-events-none`), so a double press on one selects no text beside it, as "First", "Middle" and "Page" were before; `showing`, so the count line follows the rows on screen while the page pressed is marked at once; a container query that drops the numbers under 512px, or under 768px beside a Rows per page select, and the words of Previous and Next under 384px; with `pageSizes`, the count and the select in one group at the start that asks for the room of its widest part, so on a short line the select wraps under the count while the steps keep the count's line, and on a shorter one the steps take a line of their own, never squeezing the count (`registry/cobalt/ui/pagination.tsx:265-266`); one page shows only its count, and no items shows nothing; `labels` for every word it says |
| ListBody: a `div` | The whole component: `aria-busy` and `inert` while busy, so the rows leave the tab order and the pointer, the 55 percent opacity on `--t-fade` over `--curve`, and the box unchanged (`registry/cobalt/ui/list-body.tsx:21-24`) |

## Examples
Previous, the pages with gaps, Next, and which filings are on screen.

Real uses, 0 call sites (`rg -n "<Pagination\b" app registry --glob '!registry/cobalt/ui/*'`): none yet; Atlas pages its collections by hand (`docs/research/2026-10-17-coverage.md`, row 8). The data table pages a phone list with it (`pageSize`), under the rows. ListBody has no registry consumer either: the data table dims its own stale rows the same way, at 55 percent and `inert` after the slow-wait delay (`registry/cobalt/ui/data-table.tsx:1582`, `registry/cobalt/ui/data-table.tsx:2276`, `registry/cobalt/ui/data-table.tsx:2286`), so a list and a table read as one system while they wait.

### Example files
| File | Covers | Caption |
|---|---|---|
| `docs/system/examples/pagination/default.tsx` | default | Previous, the pages with gaps, Next, and which filings are on screen |
| `docs/system/examples/pagination/links.tsx` | href=function | Each page is an address, so it can be shared and comes back on reload |
| `docs/system/examples/pagination/default.tsx` | state:first-page | It opens on the first page, with Previous greyed out and skipped |
| `docs/system/examples/pagination/state-middle-page.tsx` | state:middle-page | A gap on each side of the current page, and the row keeps its seven places |
| `docs/system/examples/pagination/state-last-page.tsx` | state:last-page | Next is greyed out, and the count ends at the total |
| Not applicable: a list that always fits on one page takes no pager (When not to use); one a filter cuts to a page shows only its count | state:one-page | Only the count |
| Not applicable: `total={0}` renders nothing; the list's own `Empty` says there is nothing | state:empty | Nothing |
| `docs/system/examples/pagination/cursor.tsx` | state:cursor | A server that hands out pages by cursor says only whether another page follows, so the pager has Previous and Next and no page numbers; the section keeps a full page's height on the last, short page |
| `docs/system/examples/pagination/state-narrow.tsx` | state:narrow | In a narrow column with the count said elsewhere, the position takes the numbers' place |
| Not applicable: reached with Tab on any example | state:focus-visible | The shared outline round the step |
| `docs/system/examples/pagination/next-page-loading.tsx` | state:rows-loading | The page you press is marked at once; the rows and the count stay, the rows dimmed, until that page arrives |
| `docs/system/examples/pagination/in-card.tsx` | composition:Card | Under a card's list of bookings, the page changes in place and the rows follow |
| `docs/system/examples/pagination/with-page-size.tsx` | composition:DataTable | Under a table, a Rows per page select sits beside the count and keeps the first row in view |
| `docs/system/examples/pagination/next-page-loading.tsx` | composition:ListBody | The rows dim inside a ListBody, with a spinner by the section's heading |

Example: Previous, the pages with gaps, Next, and which filings are on screen (`docs/system/examples/pagination/default.tsx`)

```tsx
import { useState } from "react";

import { Pagination } from "@/components/cobalt/ui/pagination";

export default function Example() {
  const [page, setPage] = useState(1);
  return <Pagination page={page} total={1284} pageSize={40} onPageChange={setPage} />;
}
```

Example: Under a card's list of bookings, the page changes in place and the rows follow (`docs/system/examples/pagination/in-card.tsx`)

```tsx
import { useState } from "react";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/cobalt/ui/card";
import { Pagination } from "@/components/cobalt/ui/pagination";
import { formatDate } from "@/components/cobalt/ui/calendar";

const PAGE_SIZE = 5;
const guests = ["Ada Okafor", "Bruno Lima", "Chen Wei", "Dana Cohen", "Priya Nair", "Farah Haddad", "Goran Petrov"];
// 23 bookings, one every two days from 1 November.
const bookings = Array.from({ length: 23 }, (_, i) => ({
  id: `b${i + 1}`,
  guest: guests[i % guests.length] ?? "",
  checkIn: new Date(Date.UTC(2026, 10, 1 + i * 2)).toISOString().slice(0, 10),
}));

export default function Example() {
  const [page, setPage] = useState(1);
  const rows = bookings.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
  return (
    <Card className="w-full max-w-lg">
      <CardHeader>
        <CardTitle>Upcoming bookings</CardTitle>
      </CardHeader>
      <CardContent className="flex flex-col gap-4">
        <ul className="flex flex-col">
          {rows.map((row) => (
            <li key={row.id} className="flex min-h-10 items-center justify-between gap-4 text-sm">
              <span>{row.guest}</span>
              <time dateTime={row.checkIn} className="text-muted-foreground">
                {formatDate(row.checkIn)}
              </time>
            </li>
          ))}
        </ul>
        <Pagination page={page} total={bookings.length} pageSize={PAGE_SIZE} onPageChange={setPage} />
      </CardContent>
    </Card>
  );
}
```

Example: Under a table, a Rows per page select sits beside the count and keeps the first row in view (`docs/system/examples/pagination/with-page-size.tsx`)

```tsx
import { useState } from "react";

import { type Column, DataTable } from "@/components/cobalt/ui/data-table";
import { Pagination } from "@/components/cobalt/ui/pagination";
import { money } from "@/lib/cobalt/format";

type Booking = { ref: string; guest: string; room: string; nights: number; total: number };

const guests = [
  "Maya Chen",
  "Daniel Okafor",
  "Sofia Reyes",
  "James Whitaker",
  "Priya Nair",
  "Lucas Meyer",
  "Hanna Lindqvist",
  "Tomás Ibarra",
  "Elena Petrova",
  "Kenji Morita",
  "Clara Dubois",
  "Grace Whitfield",
];
const rooms = ["Garden double", "Loft studio", "Harbour suite", "Courtyard twin"];
const rates = [180, 210, 420, 150];

// Sixty-four bookings, made up the same way each time.
const bookings: Booking[] = Array.from({ length: 64 }, (_, i) => {
  const nights = 1 + ((i * 7 + Math.floor(i / 5)) % 6);
  return {
    ref: `BK-${48201 + i}`,
    guest: guests[(i * 5 + Math.floor(i / 12)) % guests.length]!,
    room: rooms[(i * 3 + Math.floor(i / 4)) % rooms.length]!,
    nights,
    total: nights * rates[(i * 3 + Math.floor(i / 4)) % rates.length]!,
  };
});

const columns: Column<Booking>[] = [
  { key: "ref", label: "Booking", kind: "code", width: 110 },
  { key: "guest", label: "Guest", kind: "text" },
  { key: "room", label: "Room", kind: "text", hideBelow: 560 },
  // On a phone the nights fill the line under the guest's name, beside the total.
  { key: "nights", label: "Nights", kind: "number", phone: "meta" },
  { key: "total", label: "Total", kind: "number", cell: (row) => money(row.total) },
];

export default function Example() {
  const [page, setPage] = useState(1);
  const [size, setSize] = useState(10);
  const rows = bookings.slice((page - 1) * size, page * size);
  return (
    <div className="w-full overflow-hidden rounded-2xl bg-card">
      <DataTable
        label="Bookings"
        columns={columns}
        rows={rows}
        getRowId={(row) => row.ref}
        // The page is the whole view: on a desktop every row of it shows, and on a phone the rows
        // flow in the page with nothing scrolling inside. The pager below is the only way on.
        maxRows={size}
        pageSize={size}
        phoneMain="guest"
        // The footer counts the rows, so the phone header line does not repeat it.
        phoneCount={false}
      />
      <div className="border-t border-border px-4 py-3">
        <Pagination
          page={page}
          total={bookings.length}
          pageSize={size}
          onPageChange={setPage}
          pageSizes={[10, 25, 50]}
          // The first row on screen stays on screen when a page holds more or fewer.
          onPageSizeChange={(next) => {
            setPage(Math.floor(((page - 1) * size) / next) + 1);
            setSize(next);
          }}
        />
      </div>
    </div>
  );
}
```

Example: The rows dim inside a ListBody, with a spinner by the section's heading (`docs/system/examples/pagination/next-page-loading.tsx`)

```tsx
import { useRef, useState } from "react";

import {
  Empty,
  EmptyAction,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyTitle,
} from "@/components/cobalt/ui/empty";
import { Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemTitle } from "@/components/cobalt/ui/item";
import { ListBody } from "@/components/cobalt/ui/list-body";
import { Pagination } from "@/components/cobalt/ui/pagination";
import { Section } from "@/components/cobalt/ui/section";
import { Spinner } from "@/components/cobalt/ui/spinner";
import { date } from "@/lib/cobalt/format";
import { useSlowWait } from "@/lib/cobalt/use-slow-wait";

const PAGE_SIZE = 5;
const advisers = ["Harbour Capital Advisors", "Calder & Rowe", "Northgate Investment", "Fjord Asset Management"];
const forms = ["Form ADV", "Form 13F", "Form PF"];
// 23 filings, one a day going back from 16 October.
const filings = Array.from({ length: 23 }, (_, i) => ({
  id: `filing-${i + 1}`,
  adviser: advisers[i % advisers.length] ?? "",
  form: forms[i % forms.length] ?? "",
  filed: new Date(Date.UTC(2026, 9, 16 - i)).toISOString().slice(0, 10),
}));

// Stands in for your API call. It answers with the page after 1200ms, and fails while the browser is
// offline or the address has ?network=offline.
const request = (page: number) =>
  new Promise<number>((resolve, reject) =>
    setTimeout(() => {
      const offline = !navigator.onLine || new URLSearchParams(location.search).get("network") === "offline";
      if (offline) reject(new Error("offline"));
      else resolve(page);
    }, 1200),
  );

export default function Example() {
  // The page asked for, which the pager shows at once, and the page whose rows are on screen.
  const [page, setPage] = useState(1);
  const [shown, setShown] = useState(1);
  const [failed, setFailed] = useState(false);
  const latest = useRef(0);
  // A quick answer never dims the rows; a slow one dims them for at least the minimum.
  const dimmed = useSlowWait(page !== shown && !failed);
  const go = (next: number) => {
    setPage(next);
    setFailed(false);
    // Only the last page asked for lands, so quick presses never show an older page.
    const ticket = ++latest.current;
    request(next).then(
      (arrived) => {
        if (ticket === latest.current) setShown(arrived);
      },
      () => {
        if (ticket === latest.current) setFailed(true);
      },
    );
  };
  const rows = filings.slice((shown - 1) * PAGE_SIZE, shown * PAGE_SIZE);
  // The last page holds fewer rows; empty places keep the card a full page tall, so the pager under
  // the pointer stays where it is.
  const empty = PAGE_SIZE - rows.length;
  return (
    <Section
      id="example-pagination-filings"
      heading="Recent filings"
      controls={<span className="flex size-4">{dimmed && <Spinner label={`Loading page ${page}`} />}</span>}
      className="w-full max-w-lg"
    >
      {/* A failure takes the rows' place at their height, so the pager under them stays put. */}
      <div className="grid *:col-start-1 *:row-start-1">
        <ListBody busy={dimmed} className={failed ? "invisible" : ""}>
          <ItemGroup variant="card" render={<ul aria-label="Recent filings" />}>
            {rows.map((filing) => (
              <Item key={filing.id} render={<li />}>
                <ItemContent>
                  <ItemTitle>{filing.adviser}</ItemTitle>
                  <ItemDescription>{filing.form}</ItemDescription>
                </ItemContent>
                <ItemActions>
                  <time dateTime={filing.filed}>{date(filing.filed)}</time>
                </ItemActions>
              </Item>
            ))}
            {Array.from({ length: empty }, (_, i) => (
              <Item key={`empty-${i}`} render={<li aria-hidden="true" className="invisible" />}>
                <ItemContent>
                  <ItemTitle>
                    <span>&nbsp;</span>
                  </ItemTitle>
                  <ItemDescription>
                    <span>&nbsp;</span>
                  </ItemDescription>
                </ItemContent>
              </Item>
            ))}
          </ItemGroup>
        </ListBody>
        {failed && (
          <Empty reason="error" className="self-center">
            <EmptyHeader>
              <EmptyTitle>Page {page} did not load</EmptyTitle>
              <EmptyDescription>Check the connection and try again.</EmptyDescription>
            </EmptyHeader>
            <EmptyContent>
              <EmptyAction onClick={() => go(page)}>Try again</EmptyAction>
            </EmptyContent>
          </Empty>
        )}
      </div>
      {/* The number pressed is marked at once; the count line names the rows on screen. */}
      <Pagination page={page} showing={shown} total={filings.length} pageSize={PAGE_SIZE} onPageChange={go} />
    </Section>
  );
}
```

## Variants
Not applicable: buttons or links follow from which prop is passed, `onPageChange` or `href`, as in SegmentedControl; both render the same look. The example files cover each.

Example: Each page is an address, so it can be shared and comes back on reload (`docs/system/examples/pagination/links.tsx`)

```tsx
import { useSyncExternalStore } from "react";

import { Pagination } from "@/components/cobalt/ui/pagination";

// The showcase keeps the page in the address's hash; your app would read its router's query.
const subscribe = (change: () => void) => {
  window.addEventListener("hashchange", change);
  return () => window.removeEventListener("hashchange", change);
};
const pageFromHash = () => Number(/^#results-page-(\d+)$/.exec(window.location.hash)?.[1] ?? 1);

export default function Example() {
  const page = useSyncExternalStore(subscribe, pageFromHash, () => 1);
  return <Pagination page={page} total={486} pageSize={25} href={(p) => `#results-page-${p}`} />;
}
```

## States
| State | Trigger | What the user can do | Shown by, besides color | Checked by |
|---|---|---|---|---|
| first-page | `page` is 1 | go to any other page | Previous greyed out and disabled; the numbers run 1 to 5 before the gap | test |
| middle-page | a page past the first 4 and before the last 4 | go back or on | a gap on each side of the current page and its two neighbours | test |
| last-page | `page` is the last | go back | Next greyed out and disabled; the count ends at the total | test |
| one-page | a filter or a search leaves one page of items | nothing | the count only; no buttons | test |
| empty | `total` is 0 | nothing | nothing renders | test |
| narrow | under 512px of room, or 768px beside a page size | Previous and Next | "Page 3 of 33" in place of the numbers; under 384px, the chevrons alone; with a page size, the count, the select and Previous and Next on one 36px line from about 460px of room, the select under the count below that, and the steps on a line of their own only where the count and the steps cannot share one (`.design-system/evidence/pagination/page-size.json`) | screenshot |
| cursor | no `total`; `hasMore` says whether a page follows | Previous and Next | "41 to 60" (`labels.range`), the last page counted from `pageItems`; no page numbers; "Page 3" (`labels.pageOnly`) when the count is hidden; Next disabled once `hasMore` is false | test |
| pressed-stays | a number pressed that the row already shows beside a neighbour | press another | the row does not re-centre: the number keeps its x, measured 0px over presses on 5, 4, 3 and 2 at 1440, where it moved 40px left before; Previous and Next past the row's edge re-centre it, and they never move | test |
| current | the page shown | nothing; pressing it does nothing | the grey `--muted` fill, `aria-current="page"` | test |
| hover | pointer over a step, under `(hover: hover)` | press | the lighter `--hover` tint; the current page keeps its fill | by hand |
| focus-visible | Tab | Enter or Space | the shared 2px outline round the step | by hand |
| rows-loading | `busy` on the ListBody around the rows, after the slow-wait delay | read the rows that are there; nothing in them takes the pointer, a key or focus; use the pager | the rows at opacity 0.55 after a 150ms fade, `aria-busy="true"`, `inert`, the box unchanged; the count line still names the rows on screen (`showing`); a last page of fewer rows keeps a full page's height with empty places, so the pager under the pointer stays (the card shrank 116px before) | test |
| rows-settling | `busy` back to false | read and press | the rows fading back to opacity 1 over 150ms | by hand |

Example: It opens on the first page, with Previous greyed out and skipped (`docs/system/examples/pagination/default.tsx`)

```tsx
import { useState } from "react";

import { Pagination } from "@/components/cobalt/ui/pagination";

export default function Example() {
  const [page, setPage] = useState(1);
  return <Pagination page={page} total={1284} pageSize={40} onPageChange={setPage} />;
}
```

Example: A gap on each side of the current page, and the row keeps its seven places (`docs/system/examples/pagination/state-middle-page.tsx`)

```tsx
import { useState } from "react";

import { Pagination } from "@/components/cobalt/ui/pagination";

export default function Example() {
  const [page, setPage] = useState(17);
  return <Pagination page={page} total={1284} pageSize={40} onPageChange={setPage} />;
}
```

Example: Next is greyed out, and the count ends at the total (`docs/system/examples/pagination/state-last-page.tsx`)

```tsx
import { useState } from "react";

import { Pagination } from "@/components/cobalt/ui/pagination";

export default function Example() {
  const [page, setPage] = useState(33);
  return <Pagination page={page} total={1284} pageSize={40} onPageChange={setPage} />;
}
```

Example: A server that hands out pages by cursor says only whether another page follows, so the pager has Previous and Next and no page numbers; the section keeps a full page's height on the last, short page (`docs/system/examples/pagination/cursor.tsx`)

```tsx
import { useRef, useState } from "react";

import { Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemTitle } from "@/components/cobalt/ui/item";
import { ListBody } from "@/components/cobalt/ui/list-body";
import { Pagination } from "@/components/cobalt/ui/pagination";
import { Section } from "@/components/cobalt/ui/section";
import { date } from "@/lib/cobalt/format";
import { useSlowWait } from "@/lib/cobalt/use-slow-wait";

const PAGE_SIZE = 5;
const advisers = ["Harbour Capital Advisors", "Calder & Rowe", "Northgate Investment", "Fjord Asset Management"];
const forms = ["Form ADV", "Form 13F", "Form PF"];
// 13 filings, one a day going back from 16 October. The server never says how many.
const filings = Array.from({ length: 13 }, (_, i) => ({
  id: `filing-${i + 1}`,
  adviser: advisers[i % advisers.length] ?? "",
  form: forms[i % forms.length] ?? "",
  filed: new Date(Date.UTC(2026, 9, 16 - i)).toISOString().slice(0, 10),
}));
type Filing = (typeof filings)[number];

// Stands in for your API: the page after a cursor (here the last filing's place), and the cursor of
// the next page when there is one. It answers after 800ms.
const request = (after: number) =>
  new Promise<{ rows: Filing[]; next: number | null }>((resolve) =>
    setTimeout(() => {
      const rows = filings.slice(after, after + PAGE_SIZE);
      resolve({ rows, next: after + PAGE_SIZE < filings.length ? after + PAGE_SIZE : null });
    }, 800),
  );

export default function Example() {
  // The cursor where each page starts, as the server hands them out, so Previous knows where to go back to.
  const cursors = useRef<number[]>([0, PAGE_SIZE]);
  const [page, setPage] = useState(1);
  const [shown, setShown] = useState({ page: 1, rows: filings.slice(0, PAGE_SIZE), next: PAGE_SIZE as number | null });
  const dimmed = useSlowWait(page !== shown.page);
  const latest = useRef(0);
  const go = (next: number) => {
    // A page whose cursor has not come back yet cannot be asked for; the press before it is on its way.
    if (cursors.current[next - 1] === undefined) return;
    setPage(next);
    const ticket = ++latest.current;
    request(cursors.current[next - 1] ?? 0).then((answer) => {
      if (ticket !== latest.current) return;
      if (answer.next !== null) cursors.current[next] = answer.next;
      setShown({ page: next, rows: answer.rows, next: answer.next });
    });
  };
  // Empty places keep the list a full page tall, so the pager under the pointer stays where it is.
  const empty = PAGE_SIZE - shown.rows.length;
  return (
    <Section id="example-pagination-cursor" heading="Filings" className="w-full max-w-lg">
      <ListBody busy={dimmed}>
        <ItemGroup variant="card" render={<ul aria-label="Filings" />}>
          {shown.rows.map((filing) => (
            <Item key={filing.id} render={<li />}>
              <ItemContent>
                <ItemTitle>{filing.adviser}</ItemTitle>
                <ItemDescription>{filing.form}</ItemDescription>
              </ItemContent>
              <ItemActions>
                <time dateTime={filing.filed}>{date(filing.filed)}</time>
              </ItemActions>
            </Item>
          ))}
          {Array.from({ length: empty }, (_, i) => (
            <Item key={`empty-${i}`} render={<li aria-hidden="true" className="invisible" />}>
              <ItemContent>
                <ItemTitle>
                  <span>&nbsp;</span>
                </ItemTitle>
                <ItemDescription>
                  <span>&nbsp;</span>
                </ItemDescription>
              </ItemContent>
            </Item>
          ))}
        </ItemGroup>
      </ListBody>
      {/* No total: Next turns off once the server says nothing follows. */}
      <Pagination
        page={page}
        showing={shown.page}
        pageSize={PAGE_SIZE}
        hasMore={shown.next !== null || page > shown.page}
        pageItems={shown.rows.length}
        onPageChange={go}
      />
    </Section>
  );
}
```

Example: In a narrow column with the count said elsewhere, the position takes the numbers' place (`docs/system/examples/pagination/state-narrow.tsx`)

```tsx
import { useState } from "react";

import { Pagination } from "@/components/cobalt/ui/pagination";

export default function Example() {
  const [page, setPage] = useState(3);
  return (
    <div className="w-full max-w-xs">
      <Pagination page={page} total={1284} pageSize={40} hideSummary onPageChange={setPage} />
    </div>
  );
}
```

Example: The page you press is marked at once; the rows and the count stay, the rows dimmed, until that page arrives (`docs/system/examples/pagination/next-page-loading.tsx`)

```tsx
import { useRef, useState } from "react";

import {
  Empty,
  EmptyAction,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyTitle,
} from "@/components/cobalt/ui/empty";
import { Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemTitle } from "@/components/cobalt/ui/item";
import { ListBody } from "@/components/cobalt/ui/list-body";
import { Pagination } from "@/components/cobalt/ui/pagination";
import { Section } from "@/components/cobalt/ui/section";
import { Spinner } from "@/components/cobalt/ui/spinner";
import { date } from "@/lib/cobalt/format";
import { useSlowWait } from "@/lib/cobalt/use-slow-wait";

const PAGE_SIZE = 5;
const advisers = ["Harbour Capital Advisors", "Calder & Rowe", "Northgate Investment", "Fjord Asset Management"];
const forms = ["Form ADV", "Form 13F", "Form PF"];
// 23 filings, one a day going back from 16 October.
const filings = Array.from({ length: 23 }, (_, i) => ({
  id: `filing-${i + 1}`,
  adviser: advisers[i % advisers.length] ?? "",
  form: forms[i % forms.length] ?? "",
  filed: new Date(Date.UTC(2026, 9, 16 - i)).toISOString().slice(0, 10),
}));

// Stands in for your API call. It answers with the page after 1200ms, and fails while the browser is
// offline or the address has ?network=offline.
const request = (page: number) =>
  new Promise<number>((resolve, reject) =>
    setTimeout(() => {
      const offline = !navigator.onLine || new URLSearchParams(location.search).get("network") === "offline";
      if (offline) reject(new Error("offline"));
      else resolve(page);
    }, 1200),
  );

export default function Example() {
  // The page asked for, which the pager shows at once, and the page whose rows are on screen.
  const [page, setPage] = useState(1);
  const [shown, setShown] = useState(1);
  const [failed, setFailed] = useState(false);
  const latest = useRef(0);
  // A quick answer never dims the rows; a slow one dims them for at least the minimum.
  const dimmed = useSlowWait(page !== shown && !failed);
  const go = (next: number) => {
    setPage(next);
    setFailed(false);
    // Only the last page asked for lands, so quick presses never show an older page.
    const ticket = ++latest.current;
    request(next).then(
      (arrived) => {
        if (ticket === latest.current) setShown(arrived);
      },
      () => {
        if (ticket === latest.current) setFailed(true);
      },
    );
  };
  const rows = filings.slice((shown - 1) * PAGE_SIZE, shown * PAGE_SIZE);
  // The last page holds fewer rows; empty places keep the card a full page tall, so the pager under
  // the pointer stays where it is.
  const empty = PAGE_SIZE - rows.length;
  return (
    <Section
      id="example-pagination-filings"
      heading="Recent filings"
      controls={<span className="flex size-4">{dimmed && <Spinner label={`Loading page ${page}`} />}</span>}
      className="w-full max-w-lg"
    >
      {/* A failure takes the rows' place at their height, so the pager under them stays put. */}
      <div className="grid *:col-start-1 *:row-start-1">
        <ListBody busy={dimmed} className={failed ? "invisible" : ""}>
          <ItemGroup variant="card" render={<ul aria-label="Recent filings" />}>
            {rows.map((filing) => (
              <Item key={filing.id} render={<li />}>
                <ItemContent>
                  <ItemTitle>{filing.adviser}</ItemTitle>
                  <ItemDescription>{filing.form}</ItemDescription>
                </ItemContent>
                <ItemActions>
                  <time dateTime={filing.filed}>{date(filing.filed)}</time>
                </ItemActions>
              </Item>
            ))}
            {Array.from({ length: empty }, (_, i) => (
              <Item key={`empty-${i}`} render={<li aria-hidden="true" className="invisible" />}>
                <ItemContent>
                  <ItemTitle>
                    <span>&nbsp;</span>
                  </ItemTitle>
                  <ItemDescription>
                    <span>&nbsp;</span>
                  </ItemDescription>
                </ItemContent>
              </Item>
            ))}
          </ItemGroup>
        </ListBody>
        {failed && (
          <Empty reason="error" className="self-center">
            <EmptyHeader>
              <EmptyTitle>Page {page} did not load</EmptyTitle>
              <EmptyDescription>Check the connection and try again.</EmptyDescription>
            </EmptyHeader>
            <EmptyContent>
              <EmptyAction onClick={() => go(page)}>Try again</EmptyAction>
            </EmptyContent>
          </Empty>
        )}
      </div>
      {/* The number pressed is marked at once; the count line names the rows on screen. */}
      <Pagination page={page} showing={shown} total={filings.length} pageSize={PAGE_SIZE} onPageChange={go} />
    </Section>
  );
}
```

### State precedence
- Current and hover: current wins. The grey fill does not change.
- First-page and last-page: both show on one page, which is the one-page state: the count alone.
- Narrow and current: both show. The count line says where you are; without it, the position line names the current page.
- Disabled end and hover: disabled wins. No fill, and the plain cursor; the step still takes the pointer, so a double press there selects nothing beside it.
- Empty and one-page: Not applicable: no items renders nothing.
- Rows-loading and hover or focus-visible inside a row: rows-loading wins. `inert` takes the rows out of the tab order and the pointer, and drops a focus that was inside them, measured `pointer-events: none` while busy in `.design-system/evidence/list-body/measure-390.json`.
- Rows-loading and current: both show. The pager marks the page asked for at once, and the rows stay dimmed until it arrives.
- Cursor and narrow: both show. There are no numbers to give way; the count line, or "Page 3" without it, stands at every width.
- Pressed-stays and current: both show. The pressed number takes the grey fill where it is.

### Motion
| Trigger | Kind | Preset | Properties | Reduced motion |
|---|---|---|---|---|
| a press on a step | input | `pressable`, `--t-press` on `--curve` | background-color, box-shadow | the colour change stays |
| rows loading and settling | announce | `duration-fade`, `--t-fade` (150ms) on `--curve` | opacity | the same fade; opacity transitions stay under `reduce`, measured `transition-duration: 0.15s` under reduce in `.design-system/evidence/list-body/measure-390.json` |

## Props

<!-- Props generated from registry/cobalt/ui/pagination.tsx, registry/cobalt/ui/list-body.tsx with TypeScript by scripts/props-table.mjs -->
### Pagination

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `page` | `number` |  | The current page, from 1. |
| `pageSize` | `number` |  | How many items one page holds. |
| `className?` | `string` |  |  |
| `hasMore?` | `boolean` |  | Cursor pages: whether a page follows this one. |
| `hideSummary?` | `boolean` |  | Hides the "1 to 40 of 1,284" line, when the page says the count elsewhere. |
| `href?` | `(page: number) => string` |  | Links: the page is in the address, so it can be shared and comes back on reload. |
| `labels?` | `Partial<PaginationLabels>` |  |  |
| `locale?` | `string` |  |  |
| `onPageChange?` | `(page: number) => void` |  | Buttons: the page changes in place, such as a list inside a panel. |
| `onPageSizeChange?` | `(size: number) => void` |  | Called with the new size. |
| `pageItems?` | `number` |  | Cursor pages: how many items the page on screen holds, so a short last page counts right. |
| `pageSizes?` | `number[]` |  | The page sizes to offer, such as [25, 50, 100]; with `onPageSizeChange`, a Rows per page select. |
| `prefetch?` | `(page: number) => void` |  | Warms a page before it is asked for: called as the pointer comes onto its link or the keyboard focuses it. |
| `renderLink?` | `RenderLink` |  | Draws each link through the host's router. |
| `showing?` | `number` |  | The page whose items are on screen, when it trails `page` while the next one loads. |
| `slots?` | `number` |  | How many slots the number row keeps, the first and last pages and the gaps included; 7 by default. |
| `total?` | `number` |  | How many items there are in all. |

### ListBody

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `busy` | `boolean` |  |  |
| `children` | `ReactNode` |  |  |
| `className?` | `string` |  |  |

Notes only; gen-docs writes the table.
- `page`, `total` and `pageSize`: the page shown, from 1, how many items in all and how many on a page. A page past the end reads as the last.
- `onPageChange` for buttons, or `href` and an optional `renderLink` for links; never both.
- `slots`: how many places the number row keeps, 7 by default, 5 at least.
- `total` left out, with `hasMore` and `pageItems`: cursor pages, where the server says only whether another page follows. `pageItems` is how many items the page on screen holds, so a short last page counts right.
- `prefetch` with `href`: warms a page before it is asked for, called as the pointer comes onto its link or the keyboard focuses it, through the link's `onPointerEnter` and `onFocus`.
- `hideSummary`: drops the count line when the page says it elsewhere.
- `showing`: the page whose items are on screen, while it trails `page` as the next page loads. The count line follows it, so it never names rows that have not arrived; the number pressed follows `page` and is marked at once. `page` when left out.
- `pageSizes` with `onPageSizeChange`: a Rows per page select beside the count, such as `[25, 50, 100]`, the two in one group at the start, so they read as one line or wrap together; beside it the page numbers need 768px of room, so in a narrower line Previous and Next stand alone and the line holds. The host keeps the first row in view by moving to the page that holds it.
- `locale` and `labels`: the figures and every word, "Previous", "Next", "Page 3", "1 to 40 of 1,284", "Page 3 of 33".
- `busy` on `ListBody`: true while the next page loads, through `useSlowWait`. Its `children` are the rows, any markup the caller owns; it adds no list semantics of its own.

## Usage

### When to use
- A list a server pages, where a person wants to know where they are and jump, such as search results or filings.
- A page number that belongs in the address, so a page can be shared and comes back on reload.
- A list whose rows a page turn, a filter or a sort will replace: a ListBody around the rows keeps them on screen, dimmed, until the answer lands.

### When not to use
- A table of records that scrolls through every row the server holds. Use DataTable instead, which windows its rows and dims them itself.
- A list that always fits on one page. Use Section instead, with the count beside its heading.
- The list has no rows yet. Use Skeleton rows at the row height instead, so the page keeps its shape.
- The next page failed to load. Use Empty with a retry in place of the rows instead, which has words a dim cannot carry.
- Steps of one task, such as a setup flow. Use Tabs instead.
- Switching between views of one thing. Use SegmentedControl instead.

### Rules
- `rule/pagination-links-for-addresses`: When the page is in the address, pass `href` and `renderLink` instead of `onPageChange` with a router push, because a link can be opened in a new tab and comes back on reload, and a button cannot. Evidence: single use docs/system/examples/pagination/links.tsx:16; person D5; person D19. Check: review.
  - Don't: `<Pagination page={page} total={486} pageSize={25} onPageChange={(p) => navigate(`?page=${p}`)} />`
  - Do: `<Pagination page={page} total={486} pageSize={25} href={(p) => `?page=${p}`} renderLink={routerLink} />`
- `rule/pagination-cursor-without-total`: When the server pages by cursor and does not count, leave `total` out and pass `hasMore` and `pageItems`, instead of inventing a total or counting the pages seen as if they were all, because a made-up total puts page numbers and a "of 1,284" on screen that the server never said, and a person jumps to a page that does not exist. Evidence: principle heuristic: match between system and the real world, say only what is known; single use `docs/system/examples/pagination/cursor.tsx:84-89`. Check: test `pagination.test.tsx` renders cursor pages with no page numbers and "41 to 47" with Next off on the last page.
  - Don't: `<Pagination page={page} total={page * 20 + 1} pageSize={20} onPageChange={go} />`
  - Do: `<Pagination page={page} pageSize={20} hasMore={next !== null} pageItems={rows.length} onPageChange={go} />`
- `rule/pagination-under-the-list`: When a list is paged, put `Pagination` once, under the list, instead of above and below it, because a second pager doubles the tab stops and the reader reaches the end of the page before choosing the next. Evidence: single use docs/system/examples/pagination/in-card.tsx:36; principle heuristic: aesthetic and minimalist design. Check: review.
  - Don't: `<Pagination {...p} /><ul>{rows}</ul><Pagination {...p} />`
  - Do: `<ul>{rows}</ul><Pagination {...p} />`
- `rule/pagination-keep-the-place`: When a page turn, a filter or a sort replaces the rows, keep the old rows on screen as the `children` of a `ListBody` with `busy` set, until the answer arrives, instead of clearing the list or swapping the rows for a `Spinner` or `Skeleton`, because the rows are what the person was reading, and a cleared list collapses and moves the pager away from the pointer. Evidence: person D25; person D37; person D39; single use `docs/system/examples/pagination/next-page-loading.tsx:78`. Check: test `list-body.test.tsx` "busy or idle, the same rows render, so nothing is swapped for a skeleton"; lint trap/loading-layout-shift (scripts/check-system.mjs); review of every paged list.
  - Don't: `setRows([]); load(page).then(setRows)`
  - Do: `<ListBody busy={useSlowWait(pending)}>{rows}</ListBody><Pagination page={page} total={total} pageSize={40} onPageChange={setPage} />`
- `rule/list-body-slow-wait`: When `busy` follows a request, pass it through `useSlowWait` from `registry/cobalt/lib/use-slow-wait.ts` instead of the raw pending flag, because most answers land inside 250ms, and a dim that shows for 50ms and lifts again reads as a flicker; once shown it holds for 400ms so it never appears and vanishes in one breath. Evidence: single use `registry/cobalt/ui/data-table.tsx:1582`, the table dims its rows through the same hook, and the delays are the system's `SPINNER_DELAY_MS` and `SPINNER_MINIMUM_MS`; principle heuristic: visibility of system status, feedback for a wait the user can notice. Check: lint `rule/list-body-slow-wait` flags `busy={` bound to a name that is also passed as `status` or `pending` without `useSlowWait` in the file.
  - Don't: `<ListBody busy={status === "pending"}>{rows}</ListBody>`
  - Do: `const dimmed = useSlowWait(status === "pending"); <ListBody busy={dimmed}>{rows}</ListBody>`
- `rule/list-body-pair-with-the-cause`: When a control started the wait, show the wait on it too, as `StateButton` with `status="pending"` or a `Spinner` in a `Section`'s controls, instead of the dim alone, because the dim is told by opacity only and `aria-busy`, so a sighted person sees greyer rows and no reason, and a screen reader hears nothing until the rows change. Evidence: principle wcag: 1.4.1 Use of color, a state is not told by a visual change alone (`trap/color-only-status`); single use `docs/system/examples/pagination/next-page-loading.tsx:73`, the spinner by the heading while the next page loads. Check: review of every `ListBody` for the control that sets `busy`.
  - Don't: `useEffect(() => { setBusy(true); refetch().finally(() => setBusy(false)); }, [filter]); <ListBody busy={busy}>{rows}</ListBody>`
  - Do: `<Section heading="Recent filings" controls={dimmed && <Spinner label="Loading page 3" />}><ListBody busy={dimmed}>{rows}</ListBody></Section>`
- `rule/list-body-wraps-the-rows-only`: When a list has a heading, a filter bar or a pager, place `ListBody` around the rows and nothing else, because the heading and the controls are how the user leaves or retries the wait, and a dimmed, pointer-dead control is a dead end. Evidence: single use `docs/system/examples/pagination/next-page-loading.tsx:78`, the body around the rows with the heading and the pager outside it; principle heuristic: user control and freedom, the way out stays live. Check: review; lint `rule/list-body-wraps-the-rows-only` flags a `Button`, `Input` or `Section` as a descendant of `ListBody`.
  - Don't: `<ListBody busy={busy}><Section heading="This week" controls={pager}><ul>{rows}</ul></Section></ListBody>`
  - Do: `<Section heading="This week"><ListBody busy={busy}><ul>{rows}</ul></ListBody><Pagination {...p} /></Section>`

### Content
- `rule/pagination-summary-from-to-of`: When the count line shows, keep the "{from} to {to} of {total}" wording with grouped figures, such as "1 to 40 of 1,284", instead of "Showing 1-40 of 1284 results", because the dash reads as minus and an ungrouped total is hard to scan. Evidence: app 7/7 pagers in the examples that show the count use the default wording (`docs/system/examples/pagination/default.tsx:8`); person D10. Check: test pagination.test.tsx.
  - Don't: `labels={{ summary: (a, b, n) => `Showing ${a}-${b} of ${n} results` }}`
  - Do: `<Pagination page={1} total={1284} pageSize={40} onPageChange={setPage} />`

### Anti-slop
- `rule/pagination-no-numbers-of-your-own`: When a list needs page numbers, use `Pagination` instead of mapping `Button`s over a page range, because a hand-built range grows and shrinks with the page and moves Next under the pointer, and has no `aria-current`. Evidence: measured Next at one x across 6 pages at 1440px, `.design-system/evidence/pagination/measure.json`; person D37. Check: review.
  - Don't: `{range(page - 2, page + 2).map((p) => <Button key={p} onClick={() => setPage(p)}>{p}</Button>)}`
  - Do: `<Pagination page={page} total={total} pageSize={40} onPageChange={setPage} />`
- `rule/list-body-no-status-prop`: When the body's state is set, pass `busy` as one boolean derived from `status === "pending"`, instead of adding `isLoading`, `loading` or `status` props to it or wrapping it in a `Skeleton` when `status` is `pending`, because the body has exactly one state and the status vocabulary (`idle | pending | success | failure`) belongs to the control or the table that owns the request. Evidence: person D2; principle heuristic: consistency and standards, one word for one thing. Check: lint rule/component-override on ListBody (scripts/check-system.mjs); typecheck fails any prop but `busy`, `className` and `children`.
  - Don't: `<ListBody busy={isLoading || isFetching}>{rows}</ListBody>` with two booleans that can both be true
  - Do: `<ListBody busy={useSlowWait(status === "pending")}>{rows}</ListBody>`
- `rule/list-body-no-overlay-spinner`: When the rows dim, add no `Spinner` or "Loading" label over the middle of them, because the rows are 44px tall and a spinner over them hides the one the user was reading, and the control that caused the wait already shows it. Evidence: principle heuristic: aesthetic and minimalist design, one cue for one wait; single use `registry/cobalt/ui/data-table.tsx:2286`, the table dims with no overlay. Check: review; lint `rule/list-body-no-overlay-spinner` flags `Spinner` as a sibling of `ListBody` positioned `absolute`.
  - Don't: `<div className="relative"><ListBody busy={busy}>{rows}</ListBody>{busy && <Spinner className="absolute inset-0 m-auto" label="Loading" />}</div>`
  - Do: `<ListBody busy={busy}>{rows}</ListBody>`

### Limits
- `rule/pagination-room-for-numbers`: When `Pagination` has under 512px of room, or under 768px with `pageSizes`, expect "Page 3 of 33" or Previous and Next alone in place of the numbers and do not force them with `className` instead, because 7 numbers, Previous, Next and their gaps need about 470px, and the count and a Rows per page select about 270px more. Evidence: measured the numbers shown at 520px of room and hidden at 432px, `.design-system/evidence/pagination/measure.json`; measured with a page size one 36px line at 592px of room, the docs frame at 1440, where the select took a line of its own under the count before, and the numbers shown on that line from 768px (`.design-system/evidence/pagination/page-size.json`, `.design-system/evidence/pagination/page-size-before-592.png`). Check: probe .design-system/scripts/measure-new-inputs.mjs.
  - Don't: `<Pagination className="[&_ul]:flex" />`
  - Do: `<Pagination page={page} total={total} pageSize={40} onPageChange={setPage} />`
- `rule/pagination-page-size`: When choosing `pageSize`, pick at most 100, such as 25 or 40, instead of 500, because the pager exists to keep a page fast to load and read, and 500 rows is a DataTable's job. Evidence: measured 7 places at 51,360 pages on the worst-case stress page, `.design-system/evidence/pagination/measure.json`; principle heuristic: efficiency of use. Check: review.
  - Don't: `<Pagination pageSize={500} />`
  - Do: `<Pagination pageSize={40} />`
- `rule/list-body-rows-in-view`: When more than 17 rows of 44px load at once at 390px, window them through `DataTable` or page them 17 at a time, and keep the control that caused the wait in view, because at 18 rows the dimmed region runs past a 844px screen (860px), so the rows the user scrolls to carry no cue but lower contrast. Evidence: measured 44px rows with a 4px gap passing the viewport at 18 rows (bottom 860 > 844), `.design-system/evidence/list-body/measure-390.json`. Check: probe `.design-system/scripts/measure-feedback-b.mjs` on the showcase at 390.
  - Don't: `<ListBody busy={busy}><ul>{all200.map(row)}</ul></ListBody>`
  - Do: `<ListBody busy={busy}><ul>{page.map(row)}</ul></ListBody>` with 17 rows or fewer and the Pagination under them
- `rule/list-body-opacity-floor`: When the rows carry text below 14px or in `--muted-foreground`, keep the row text at 14px `--foreground` on `--card`, because the dim multiplies every contrast by 0.55: measured 4.49:1 for 14px foreground text on a card over the page in light and 5.75:1 in dark, and muted text at 6:1 at rest would land near 2.5:1 while busy. Evidence: measured text on row dimmed 4.49 light and 5.75 dark, at rest 19.79 and 17.16, `.design-system/evidence/list-body/measure-390.json`. Check: probe `.design-system/scripts/measure-feedback-b.mjs`; review of row text colours inside `ListBody`.
  - Don't: `<ListBody busy={busy}><li className="text-xs text-muted-foreground">{row.note}</li></ListBody>`
  - Do: `<ListBody busy={busy}><li className="text-sm">{row.name}</li></ListBody>`

## Accessibility
Rests on a native `<nav>` named by `labels.label`, with native buttons or links; the rows above it sit in a ListBody `div` that carries `aria-busy` while the next page loads.

### Keyboard
| Key | Where focus is | Effect | Focus after | Checked by |
|---|---|---|---|---|
| Tab | before the pager | focuses Previous, or the first page when Previous is disabled | that step | by hand |
| Tab | a step | moves to the next enabled step; a disabled end is skipped | the next step | by hand |
| Enter, or Space on a button | a step | goes to that page | the same step, which stays in place | by hand |
| Tab | before the rows while they load | skips them; `inert` takes them out of the tab order until the page arrives | the pager | by hand |

### ARIA
| Part | Role | Accessible name from | States and properties | Announced | Checked by |
|---|---|---|---|---|---|
| root | navigation | `labels.label`, "Pages" | none | "Pages, navigation" | test |
| count line | none | its text | none | "1 to 40 of 1,284" in reading order; "41 to 60" for cursor pages | test |
| page step | button or link | `labels.page`, "Page 3" | `aria-current="page"` on the current one | "Page 3, current page" | test |
| Previous, Next | button or link | `labels.previous`, `labels.next` | `disabled`, or `aria-disabled` on the link's span | "Next, dimmed" at the end | test |
| gap | none, `aria-hidden` | none | none | nothing | test |
| position line | none | its text | none | "Page 3 of 33" under 512px, when the count is hidden | by hand |
| ListBody | none (`div`) | none; the list inside carries its own name | `aria-busy="true"` and `inert` while busy, absent while idle | nothing on its own; the control that set it carries the status | test |

## Tokens
| Part | State | Token |
|---|---|---|
| step | all | `--control` tall and wide, `--r-lg`, text-sm medium, tabular figures |
| step | hover | `--hover` |
| step | current | `--muted` fill, `--foreground` text |
| step | disabled | `--muted-foreground`, opacity 50 percent |
| count, position, gap | all | `--muted-foreground` |
| ListBody | busy | `--t-fade` through `duration-fade`, `--curve`, opacity 0.55 |

Measured (`.design-system/evidence/pagination/measure.json`): steps 36px, with `touch-target`, so under a coarse pointer each step's hit area is 44x44 (measured 36x36 before, iPhone 13 emulation, 2026-10-17); Next at one x over 6 pages at 1440px and Previous at one x over 12 pages at 390px.

## Related
- DataTable: windows every row instead of paging, and pages a phone list with this pager under its rows.
- ResultCount: the count above a list, "At least 200 filings" while cursor pages have not reached the end.
- SegmentedControl: the same buttons-or-links split for a few views.
- Section: the heading a paged list sits under.
- Item: the row a paged list is made of.
- Empty: the rows' place when a page fails to load.
