Skip to content
Back

PaginationPro

Previous and next around a sliding five-page window with a travelling current mark; numbers slide like a belt when the window shifts. Oxyn adds ellipsis, cursor, load-more and page sizes.

oxyn add pagination
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Moving through runs, logs and table pages without losing your place.
  • The user wants to see where they are and step or jump.

When not to use

  • Native scrolling with thin overlay scrollbars and edge fades that grow with what's left: use Scroll area instead.
  • An app sidebar: use Sidebar instead.
  • A workspace sidebar: use Workspace sidebar instead.

Installation

Pagination is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add pagination

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Window

A five-page window.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Ellipsis

First, last and neighbours.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Table

With a range and rows per page.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Load more

A Load more button.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

Pagination

PropTypeDefaultDescription
pageusize1Current page (1-based).
countusize12Total pages (ignored with `total`).
modeString"window"`window` · `ellipsis` · `cursor` · `load-more`.
labelString"Pagination"Landmark name.
totalOption<usize>Default::default()Items in total (adds the range label; pages follow the page size).
sizesVec<usize>Default::default()Page sizes offered (with `total`).
on_page_changeEventHandler<usize>—Page changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabPrevious, pages, next
EnterorSpaceGo to that page

Accessibility

  • A nav landmark; the current page has aria-current=page; previous and next are disabled at the ends.
From the spec

A nav landmark with a label. Each number is a button labelled "Go to page n" (the current one "Page n, current") with aria-current. Previous / next have labels and are disabled at the ends.

Motion & interaction

The current mark travels between numbers on a soft spring. When the window shifts the numbers slide like a belt by the number of slots it moved.

Timing
TransitionDurationEasingReduced motion
Mark travel300 msspring (1.3 overshoot)instant
Belt shift340 msease.outinstant

Responsive behaviour

  • Window mode keeps the same width on any screen; the row wraps when it must.
Edge cases (spec)

Count 0 shows a single disabled page. Changing page size recomputes the page so the first visible row stays on screen. Window mode never changes width.

Notes for AI

  • Import Pagination from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: PaginationEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI