Component

Pagination

A small pagination primitive for tables, ledgers, and search results.

Preview

Installation

Install the package, then import the component and shared stylesheet in your app.

Package install

Install the package when you want components imported from axie-ui.

install
pnpm add axie-ui

Import

code
import "axie-ui/styles.css";import { Pagination } from "axie-ui";

Registry install

Use the direct URL when you want shadcn to copy editable source into your app. This works without the official registry and does not install axie-ui.

registry
pnpm dlx shadcn@latest add https://axie.alexi.life/r/pagination.json

Copied source import

code
import "@/styles/axie.css";import { Pagination } from "@/components/axie/pagination";

Prefer @axie/pagination? Add the Axie namespace once from the Installation page, then use that shorthand.

Usage

code
import { Pagination, PaginationItem } from "axie-ui";export function Example() {  return (    <Pagination>      <PaginationItem>Prev</PaginationItem>      <PaginationItem current>2</PaginationItem>      <PaginationItem>Next</PaginationItem>    </Pagination>  );}

Accessibility

  • Use links when pages are navigable URLs and buttons when pagination is local state.
  • Mark the current page with `aria-current="page"`.
  • Keep previous and next labels available to assistive technology.

API Reference

PropTypeDefaultDescription
labelstringPaginationAccessible nav label.
currentboolean-Marks the active page.
...propsButtonHTMLAttributes<HTMLButtonElement>-Native button props.