Pagination · pager
A pager that keeps its shape — numbers roll in their cells, the highlight slides, “…” jumps ahead — with totals, a page-size picker, a jump box, four looks and keyboard paging.
Numbers roll · the highlight slides · “…” jumps five
Page 3 of 12 · click a number, ‹ ›, or focus the pager and use ← → Home End
With a total and a page size
Looks · sizes
Usage
import { signal } from "./index.js";import { Pagination } from "./components/pagination.js"; const page = signal(3); // windowed numbers; the row keeps its shape, the numbers roll, the highlight slidesPagination({ page, totalPages: 12, onChange: (p) => console.log(p) }) // from a row count: "21–30 of 234", a page-size picker, a box to type a page intoconst size = signal(10);Pagination({ page, totalItems: 234, pageSize: size, pageSizes: [10, 20, 50], showTotal: true, jump: true }) // variant: "outline" (default) · "ghost" · "pills" · "simple" — size: "sm" · "lg"Pagination({ page, totalPages: 400, variant: "ghost", span: 1, edges: false })Pagination({ page, totalPages: 12, variant: "simple" }) // ‹ Page 3 of 12 ›