Skip to content

Pagination

Pagination with page navigation, next and previous links.

Install

Bash
npx @madeui/cli add pagination

Usage

TSX
import {
  Pagination,
  PaginationContent,
  PaginationEllipsis,
  PaginationItem,
  PaginationLink,
  PaginationNext,
  PaginationPrevious,
} from '@/components/ui/pagination';

Composition

TSX
<Pagination>
  <PaginationContent>
    <PaginationItem>
      <PaginationPrevious />
    </PaginationItem>
    <PaginationItem>
      <PaginationLink />
    </PaginationItem>
    <PaginationItem>
      <PaginationEllipsis />
    </PaginationItem>
    <PaginationItem>
      <PaginationNext />
    </PaginationItem>
  </PaginationContent>
</Pagination>

Simple

Numbers only, no previous/next controls.

Icons only

Pass text="" to PaginationPrevious / PaginationNext to hide the label at every breakpoint — aria-label still carries the accessible name. size is fixed to md on both, so a style override squares up the padding for an icon-only look.

API reference

Plain semantic markup rendered through Button — links use Base UI’s render prop under the hood, so they are real <a> elements.

PropTypeDefaultDescription
isActiveboolean—Renders as the outline button variant with aria-current="page".
sizeButtonSize'icon'
styleStyleXStyles—StyleX styles merged last — always win over the component’s own styles.

PaginationPrevious / PaginationNext

PropTypeDefaultDescription
textstring'Previous' / 'Next'Label text; hidden below the sm breakpoint.

Both also accept all PaginationLink props except size.

Was this page helpful?