AhaSlides Design
v0.52.0React · Vue · Lit

Components · Navigation

Pagination

A page selector for a paged list or table — prev / numbered pages with ellipsis / next; two sizes, a simple mode, and a whole-control disabled state.

Examples

Size
Mode
Paged list · 248 items · 20 per page · page 3 (ellipsis for the long range)
Short range · no ellipsis
Small size
Simple mode · prev · n / total · next
Disabled (whole control)

API

PropTypeDefaultNotes
totalnumber0Total item count across all pages (used with page-size)
page-sizenumber10Items per page; total ÷ page-size decides the page count
pagesnumberDirect page count; wins over total+page-size when set
currentnumber1The active page (1-based); reflected as it changes
size'default' | 'small'defaultCell scale: 32px square (default) or compact 24px (small)
simplebooleanfalseCollapse the numbers to prev · n / total · next
disabledbooleanfalseDisable the whole control (every cell not-allowed)
changeCustomEventComposed event on page change, detail { page }

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-pagination';   // registers <aha-pagination>

Agent feed for this component (absolute, fetchable anywhere): pagination.agent.json · pagination.md · pagination.llms.txt

When to use

When to use
  • Pagination — a long list or table is split into pages the user steps through
  • infinite scroll — a feed the user grazes — not a set they navigate by position
  • Load more — occasional appends where exact page position doesn't matter
Show pagination only when there is more than one page. Keep page cells on the 32px square + radius-8 scale (or the 24px small scale for dense tables), and reserve the brand fill for the current page. The first/last ellipsis keeps long ranges compact; reach for simple mode when width is tight.
Surfaces
dashboard admin editor

Spec

Cell (default) min-width 32 · height 32 · radius 8 · SemiBold 600 · Cell (small) min-width 24 · height 24 · radius 6 · 12px · Rest white bg, 1px border #E3E3E3, text-default · Hover border-hover #D3B4FF + color-primary text (motion-fast + ease-out) · Current color-primary #6A1EBB fill, text-inverse #FFFFFF · Ellipsis … text-tertiary #8A8A8A, aria-hidden, for elided ranges · Simple prev · <b>n</b> / total · next — n in color-primary · Disabled prev/next text-disabled #B5B5B5, not-allowed · Disabled (all) every cell not-allowed; current keeps brand fill at .55 opacity · Arrows <aha-icon name="system-caret-left|right" size=16>