Paginator
A controlled Signal paginator with deterministic page windows, localized range reports, complete user events and native navigation semantics.
GET STARTED
Import
Import the canonical standalone component from its granular entry point. The legacy PaginatorComponent export is retained only as a compatibility alias.
Basic pagination
Bind both models when page navigation also controls a visible collection. The event range is directly compatible with slice(startIndex, endIndex).
Agent workflow 001
Automation
Agent workflow 002
Reasoning
Agent workflow 003
Retrieval
Agent workflow 004
Automation
Agent workflow 005
Reasoning
No page interaction yet.
Stable page window
Large collections retain their useful edges and compress the middle range with non-interactive ellipsis markers. pageLinkCount is normalized to at least five.
Report and local labels
The global locale supplies every label by default. A component may override the report and any accessible label without mutating application-wide messages.
Visibility and states
First/last controls and the report are independently optional. Disabled state reaches buttons and the page-size selector; an empty collection produces no invalid page buttons.
Compact controls
Disabled
Empty collection
Visual variants
Rounded controls provide a circular navigation language while the outlined variant removes visible button borders and resting backgrounds. It adds a primary-tinted surface only on hover and identifies the active page with the primary foreground. Both variants preserve sizing and focus feedback, and they can be combined.
Rounded
Borderless outlined
Combined
Unstyled and typed classes
Headless mode removes all NeuralNg visual classes while native structure, state normalization, localization, events and ARIA remain intact.
ACCESSIBILITY
Native pagination model
Paginator uses a labelled navigation landmark, native list and button semantics, a current-page marker and polite range announcements.
Landmark and structure
The root is a nav labelled by the active locale. Page controls live in a native unordered list; ellipses are presentation-only and never enter the tab order.
Current page and report
The selected button exposes aria-current="page". The range report uses aria-live="polite" and aria-atomic="true" so navigation updates are announced as one message.
Keyboard behavior
Tab follows normal document order. Enter and Space activate the focused native button. The composed NeuralSelect adds its standard listbox navigation, typeahead and Escape behavior. Boundary controls are genuinely disabled.
Localized labels
First, previous, next, last, page and page-size labels resolve from NeuralLocaleService. The labels input merges a partial local override over those messages.
API
Public contract
Signal models remain controlled; semantic events are emitted only after direct user interaction.
Inputs and models
| Name | Type | Default | Purpose |
|---|---|---|---|
| totalItems | number | 0 | Full collection size; negative and fractional values normalize safely. |
| pageIndex | model<number> | 0 | Zero-based controlled page index. |
| pageSize | model<number> | 10 | Items per page; changing it preserves the first visible item. |
| pageSizeOptions | readonly number[] | [] | Sorted size choices; an empty array hides the selector. |
| pageLinkCount | number | 5 | Maximum numeric page window, normalized to at least five. |
| showFirstLast | boolean | true | Shows first-page and last-page controls. |
| showReport | boolean | true | Shows the polite current-range report. |
| reportTemplate | string | null | null | Local report override with supported placeholders. |
| labels | Partial<NeuralPaginatorLabels> | {} | Component-level accessible-label overrides. |
| disabled | boolean | false | Disables every navigation and NeuralSelect size control. |
| rounded | boolean | false | Makes navigation and numeric page controls circular. |
| outlined | boolean | false | Removes resting borders and backgrounds; hover uses a primary-tinted theme surface. |
| firstPageIcon | string | nt-chevrons-left | First-page Neural Icons class. |
| previousPageIcon | string | nt-chevron-left | Previous-page icon class. |
| nextPageIcon | string | nt-chevron-right | Next-page icon class. |
| lastPageIcon | string | nt-chevrons-right | Last-page Neural Icons class. |
| ellipsisIcon | string | nt-dots | Truncated page-window icon class. |
| unstyled | boolean | false | Removes NeuralNg visual classes while retaining structure. |
| paginatorClass | string | '' | Additive class applied to the internal nav. |
| classes | NeuralPaginatorClasses | {} | Typed additive classes for internal slots. |
Events
pageIndexChangenumberImplicit model output when the selected page changes.
pageSizeChangenumberImplicit model output when the user chooses another size.
pageChangeNeuralPageChangeSemantic user event containing the complete normalized page state.
Typed class slots
rootInternal nav landmark.
listNative list containing page controls.
navigationButtonFirst, previous, next, and last buttons.
pageButtonEvery numeric page button.
activePageButtonCurrent numeric page button.
iconAll navigation and ellipsis icons.
ellipsisNon-interactive truncated-range marker.
reportLive current-range text.
pageSizePage-size label wrapper.
pageSizeSelectTrigger of the composed NeuralSelect size control.
NeuralPageChange
The payload contains pageIndex, pageSize, pageCount, totalItems, startIndex and endIndex. Start is inclusive and end is exclusive.
DESIGN TOKENS
Paginator tokens
Every documented variable below is verified against the shipped Neutral theme and the component’s real CSS usage.
--neural-paginator-gapSpacing between component items.
--neural-paginator-list-gapSpacing between list items.
--neural-paginator-colorComponent foreground color.
--neural-paginator-font-familyComponent font family.
--neural-paginator-font-sizeComponent font size.
--neural-paginator-button-sizeButton width and height.
--neural-paginator-button-paddingButton internal spacing.
--neural-paginator-button-colorButton foreground color.
--neural-paginator-button-backgroundButton background surface.
--neural-paginator-button-borderButton border shorthand.
--neural-paginator-button-radiusButton corner radius.
--neural-paginator-button-color-hoverHovered button foreground color.
--neural-paginator-button-background-hoverHovered button background surface.
--neural-paginator-button-border-color-hoverHovered button border color.
--neural-paginator-active-colorActive foreground color.
--neural-paginator-active-backgroundActive background surface.
--neural-paginator-active-border-colorActive border color.
--neural-paginator-report-colorReport foreground color.
--neural-paginator-size-gapSpacing between size items.
--neural-paginator-size-select-paddingSize select internal spacing.
--neural-paginator-focus-ringComponent keyboard focus ring.
--neural-paginator-focus-ring-offsetComponent focus ring offset.
--neural-paginator-disabled-opacityDisabled opacity.
--neural-paginator-transitionComponent CSS transition.