OGE logoOGE

Pagination

A standalone pagination bar around two-way [(pageIndex)]/[(pageSize)] models — 0-based, with pageSize: 0 meaning "all items" (the grid pager's contracts, kept aligned by design). The numeric window holds a constant width: ellipsis slots count toward maxButtons, so the bar never jitters while paging, and an ellipsis never hides a single page.

No WAI-ARIA APG pagination pattern exists, so the markup is composed from primitives: a <nav> landmark named by messages, real buttons with aria-current="page" on the active page, and the info range in an aria-live="polite" region. Keyboard is the native Tab order — every control is a native element, and the APG defines no arrow-key behavior to invent. Rendering several bars on one page? Give each a distinct paginationLabel via [messages] — landmarks must be unique.

nav landmark aria-current constant-width window

Getting started

Numeric buttons in a constant-width window with real ellipsis markers. pageChanged reports previousPageIndex and fires only on user interaction — programmatic writes and auto-clamps update the model silently.

pageIndex maxButtons ellipsis

Page index: 0

Page sizes and info

Presence of pageSizes shows the selector; 'all' commits pageSize: 0. showInfo renders the {from}–{to} of {itemCount} range from messages, in a polite live region. Shrinking the count auto-clamps pageIndex.

pageSizes all option showInfo

Jump controls

First/last buttons and the jump-to-page input are opt-in — the numeric rails already render both ends, so the defaults stay lean. The jump input displays 1-based, commits on Enter/change and clamps into range.

showFirstLastButtons showJumpToPageInput

Unknown total

Without itemCount the total is unknown: only prev/next and a "Page N" indicator render, and next never disables — the component cannot know the end. Clamp pageIndex at the app level when the server reports the last page.

itemCount: undefined cursor paging

Adaptive display

displayMode: 'adaptive' collapses to the compact N / M indicator below the container threshold (compactBelow, default 480px) — measured against the bar's own box, never the window. 'compact' forces the indicator.

displayMode container width

Configuration

Every string — the <nav> label, button aria labels, the info template — lives in OgePaginationMessages: override globally via provideOgePaginationConfig() or per instance via [messages]. maxButtons, displayMode and compactBelow carry config defaults too.

provideOgePaginationConfig messages