Paged navigation control with deterministic page-window rendering.
Install @wyrd-company/react or the Flutter package and use it directly —
your DESIGN.md does the styling.
catalog/contracts/pagination.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: Paginationtag: wyrd-paginationpackage: wyrd.component.paginationtitle: Paginationsummary: Paged navigation control with deterministic page-window rendering.relationships:related-to: - quality-parity-and-gatesclassification:category: navigationcomposition: collectioninteractive: truetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: pagetype:kind: integerrequired: falsecontrolled: trueserializable: truesummary: Controlled current 1-based page. - name: default-pagetype:kind: integerrequired: falsedefault: 1serializable: truesummary: Initial uncontrolled 1-based page. - name: page-counttype:kind: integerminimum: 1required: trueserializable: truesummary: Total number of pages.slots: []events: - name: page-changepayload:page:kind: integerbubbles: truecomposed: truecancelable: truesummary: Emitted when the user requests a different page.states: - name: defaultsource: platformsummary: Page navigation with previous, windowed page items, and next. - name: currentsource: propertysummary: Current page derived from page or default-page. - name: boundarysource: propertysummary: Previous or next is disabled at the first or last page.parts: - name: rootsummary: Navigation landmark root. - name: listsummary: Page item list. - name: itemsummary: Repeated page item. - name: buttonsummary: Previous, page, or next button. - name: ellipsissummary: Hidden decorative gap marker.tokens:item:background: color.surfaceforeground: color.primarybackground-hover: color.secondarycurrent-background: color.primarycurrent-foreground: color.on-primarydisabled-foreground: color.on-disabledradius: rounded.mdpadding-x: spacing.smpadding-y: spacing.xsgap: spacing.xstext: typography.label-mdmessages: - key: pagination.navigationdescription: Accessible name of the pagination navigation landmark. - key: pagination.previousdescription: Accessible label for the previous page button. - key: pagination.nextdescription: Accessible label for the next page button.obligations:accessibility:role: navigationname: Component-owned localized navigation message labels the landmark.keyboard: - Tab moves through enabled pagination buttons in document order. - Enter or Space activates a focused pagination button.semantics: - Current page buttons expose aria-current=page on web. - Previous is disabled on the first page; Next is disabled on the last page. - Ellipsis markers are hidden from the accessibility tree. - Previous and Next are named by component-owned localized messages.behavior:model: inputinteractions: - page ?? default-page determines the effective page in Flutter and other controlled-capable targets. - If page-count is 7 or fewer, all pages render. - If page-count is greater than 7, render first, last, current-1, current, current+1, and ellipsis markers between gaps.hostEffects: - Dispatch page-change when the user requests a different page.conditions: - rtl - cvd-deuteranopia - density-compact - text-expansionsdui:status: serializableserializableProperties: - page - default-page - page-countserializableSlots: []eventBindings: - page-changenotes: Pagination serializes controlled and default page inputs plus page count; hosts own route/data changes.examples: - name: singlestate: boundaryproperties:default-page: 1page-count: 1slots: {} - name: sevenstate: defaultproperties:default-page: 4page-count: 7slots: {} - name: windowedstate: currentproperties:default-page: 10page-count: 20slots: {}
01
Examples
Generated from the contract's examples block.
Previews are the published @wyrd-company/react component, themed by the
brand's role tokens — flip the site's light/dark toggle and they follow.
The contract's token bindings. Open the shared contextual sidebar from any example;
primary swatches reflect the color you pick there. Error swatches show the active
preset's values; editing any knob switches to custom and resets error to TWW · Ink.
Binding
Token
item.background
color.surface
item.foreground
color.primary
item.background-hover
color.secondary
item.current-background
color.primary
item.current-foreground
color.on-primary
item.disabled-foreground
color.on-disabled
radius
rounded.md
padding-x
spacing.sm
padding-y
spacing.xs
gap
spacing.xs
text
typography.label-md
05
States
State
Source
Summary
default
platform
Page navigation with previous, windowed page items, and next.
current
property
Current page derived from page or default-page.
boundary
property
Previous or next is disabled at the first or last page.
06
Accessibility
From the contract's accessibility obligations. Role navigation; Component-owned localized navigation message labels the landmark.
Tab moves through enabled pagination buttons in document order.
Enter or Space activates a focused pagination button.
Current page buttons expose aria-current=page on web.
Previous is disabled on the first page; Next is disabled on the last page.
Ellipsis markers are hidden from the accessibility tree.
Previous and Next are named by component-owned localized messages.