Components / behavioral
PaginationBar
Navigates between pages of a collection.
Generated from @oods/foundry 0.10.1
- Categories
- behavioral
- Contexts
- list
- Readiness
proven-in-generated-apps
Playground
This component's contract doesn't list typed props, so the playground shows its documented example.
Documented example pagination-bar-navigation : activate next page, page 3 emitted once.
The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.
Events it emits: pageChange, pageSizeChange, change, update. Use either render above, and each event shows here with the framework that sent it.
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
import { PaginationBar } from '@oods/components-react';
import '@oods/component-styles/css';
export function Example() {
return (
<PaginationBar
page={2}
pageSize={25}
totalItems={80}
showItemRange={true}
/>
);
}Props, slots and events
Contract version 1.1.0. Types are from the React declarations in @oods/components-react.
| Prop | Type | Required | Documented example |
|---|---|---|---|
page | number | undefined | no | 2 |
page | number | undefined | no | 25 |
total | number | undefined | no | 80 |
total | number | undefined | no | |
page | readonly number[] | undefined | no | |
show | boolean | undefined | no | |
show | boolean | undefined | no | |
show | boolean | undefined | no | true |
Slots
none
Events
pageChange, pageSizeChange, change, update
States
first-page, middle-page, last-page, empty
Accessibility
- Role
button- How it gets its name
aria-labelonbutton[aria-label="Next page"]
Keyboard
| Key | What it does |
|---|---|
| Tab | Move focus to the named native control |
| Enter | Activate the control |
Obligations in the contract
- Navigation is named
- Current page is exposed with aria-current
Uses page/pageSize/totalItems while preserving the legacy page/count headless behavior.
Tokens
The token roles this component reads.
pagination.backgroundpagination.borderpagination.textpagination.focus
Readiness
The evidence recorded for this component, with its label.
proven-in-generated-apps: catalog_list gives this label when generated React and Vue apps in the runtime sweep that ships with this version both use the component. That sweep was measured on the published 0.4.1, not on this version.
| Evidence | React | Vue |
|---|---|---|
| state | implemented-evidence-complete | implemented-evidence-complete |
| versioned contract | passed | passed |
| target implementation | passed | passed |
| package export | passed | passed |
| public declaration | passed | passed |
| dependency closure | passed | passed |
| framework scenario | passed | passed |
| accessibility | verified | verified |
| interaction | verified | verified |
| visual themes | verified | verified |
Use your own
You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.
The component_map call, with the parts in angle brackets yours to fill:
{
"action": "create",
"apply": true,
"externalSystem": "<your design system>",
"externalComponent": "<YourPaginationBar>",
"oodsTraits": [
"Pageable"
],
"substitution": {
"component": "PaginationBar",
"react": {
"package": "<your-package>/react",
"version": "<exact version>",
"export": "<YourPaginationBar>"
},
"vue": {
"package": "<your-package>/vue",
"version": "<exact version>",
"export": "<YourPaginationBar>"
}
}
} How this page was made
Generated at build from the published data, each source with the hash of what was read. The page's manifest.
- Contract:
@oods/component-contracts@0.10.1 componentContracts.PaginationBarsha256:4c00e829bb6f… - Documented example:
@oods/component-contracts@0.10.1 sharedScenarios pagination-bar-navigationsha256:920c2f55fcb4… - Catalog entry (catalog_list):
generated/0.10.1/system/catalog.json PaginationBarsha256:8f8be4034b52… - React readiness:
@oods/components-react@0.10.1 readiness PaginationBarsha256:4d236eaa5880… - Vue readiness:
@oods/components-vue@0.10.1 readiness PaginationBarsha256:54402d746aeb… - Prop types:
generated/0.10.1/components/prop-types.json PaginationBarsha256:ec567fd619d3…