Noctis

Pagination

Controls for moving through a paged dataset. Pagination.Root owns the controlled page model and shares it with its parts: a navigation ButtonGroup of first/previous/next/last buttons, an editable page field, a "Showing X–Y of Z" status line, and a page-size picker. It composes the shipped Button, ButtonGroup, Input, and Select — so it inherits their sizing, theming, and accessibility.

Basic

Pass page and onPageChange (the controlled model), plus total and perPage so the status line and the last-page bound can be computed. Compose Pagination.Previous and Pagination.Next inside Pagination.Controls for the smallest useful control; the buttons disable themselves at the bounds.

Showing 1–10 of 100

Full controls

Add Pagination.First, Pagination.Last, and the editable Pagination.Page for the full set. The buttons weld into one ButtonGroup; the page field accepts a typed page (Enter or blur commits, clamped to the valid range).

Showing 51–75 of 250

Simple

When you only know the page count (not the item total), pass pageCount directly and use just the previous/next buttons. size="sm" gives a denser control.

Page size

The page-size picker is composable: Pagination.PageSize is a layout cluster holding a separate Pagination.PageSizeLabel (the "Per page" text — override it with children) and Pagination.PageSizeSelect (the Select, controlled via value + onValueChange). Keep them apart so you can reorder, restyle, translate, or drop either. Reset the page to 1 in the handler so the new size starts from the top; Pagination.Separator draws a quiet divider between clusters.

Showing 1–25 of 500
Per page

Sizes

size on Pagination.Root (sm or md, the default) scales the hosted controls. The nav buttons and the welded page field both drop to sm (the field's height is pinned to match the buttons); the page-size select uses its md minimum, since Select has no smaller rung.

Tooltips

Wrap each nav button in a Tooltip to name the action on hover or focus — useful since the buttons are icon-only. Render the button through Tooltip.Trigger's render prop so it stays a welded segment of the group; a shared Tooltip.Provider makes the row's tooltips open instantly once one is shown.

Showing 51–75 of 250

Custom info text

Pagination.Info renders "Showing X–Y of Z" by default. Pass a render function as its children for custom text — e.g. "Page X of Y" — receiving the page, page count, range, and totals.

Page 3 of 12

Keyboard

The controls are standard buttons and an input, so they follow native semantics.

KeyAction
TabMove between the page field, the nav buttons, and the page-size select.
EnterCommit a typed page in Pagination.Page (clamped to the valid range).
Space / EnterActivate the focused nav button.

Disabled boundary buttons (previous/first on page 1, next/last on the last page) are skipped by Tab. Nav chevrons mirror under RTL.

Accessibility

Pagination.Controls renders a <nav> landmark labelled "Pagination" (override via the root's labels). Each nav button is icon-only with an accessible name (First page, Previous page, …); Pagination.Page and Pagination.PageSize carry their own labels. Pagination.Info is an aria-live="polite" region, so the range is announced as the page changes. All names flow through @stridge/noctis-intl — override per instance with the labels prop, or globally with a locale dictionary.

Anatomy

Compose the bar from its parts; Pagination.Root is controlled and shares the page model through context.

  • Pagination.Root — owns page / onPageChange, total + perPage (or pageCount), size, and labels.
  • Pagination.Info — the "Showing X–Y of Z" status line; pass a render function for custom text.
  • Pagination.PageSize — a layout cluster for the page-size picker; compose Pagination.PageSizeLabel (the "Per page" text) and Pagination.PageSizeSelect (the Select, value / onValueChange) inside.
  • Pagination.Separator — a vertical hairline between clusters.
  • Pagination.Controls — the <nav> landmark wrapping a welded ButtonGroup.
  • Pagination.First / Previous / Next / Last — bounds-aware nav buttons.
  • Pagination.Page — the editable page-number field.

Pagination owns the noctis-pagination, noctis-pagination-info, noctis-pagination-page-size, noctis-pagination-page-size-label, noctis-pagination-page, noctis-pagination-controls, and noctis-pagination-separator slots; the hosted controls keep their own noctis-button / noctis-input / noctis-select-* slots.

On surfaces

The same control re-tuned across the elevation scopes — the root canvas, an elevated panel, a menu, and a sunken well. It stays legible on every layer.

root
Showing 51–75 of 250
elevated
Showing 51–75 of 250
menu
Showing 51–75 of 250
sunken
Showing 51–75 of 250

Design tokens

Generated from the component's declaration — the same graph that mints the CSS. Pagination mints only its own layout and chrome (the row gap, the info type, the page-field width, the separator); the hosted controls carry their own tokens. Set one on any ancestor to retune every pagination in that region. See Customization for the override ladder and Tokens for the whole graph.

Token

API reference

Generated from the component's types — every prop, type, default, and description comes straight from the source. Each part gets its own table. Expand a row for the full type and description.

Pagination.Root

Prop

Pagination.Info

Prop

Pagination.PageSize

Prop

Pagination.Controls

Prop

Pagination.First

Prop

Pagination.Previous

Prop

Pagination.Next

Prop

Pagination.Last

Prop

Pagination.Page

Prop

Pagination.Separator

Prop

AttributeDescription
data-slotThe root navigation container.
data-sizeThe control scale — `sm` | `md` (default); fed to the hosted Button/Input/Select.