ZBMui

Pagination

View markdown

Navigation controls for moving between pages of content.

Installation

Usage

Examples

Sizes

Pass size to PaginationLink, PaginationPrevious, PaginationNext, PaginationFirst, or PaginationLast to change the button size. Use the icon sizes (icon-xs, icon-sm, icon, icon-lg) to keep page numbers and icon-only buttons square.

Label and custom icon

Pass label to PaginationPrevious or PaginationNext to show text next to the icon. The label is hidden on small screens, where the button collapses to an icon-only square. Pass icon to replace the default chevron. The two can be combined.

Icon-only navigation

Omit the page links to render a compact set of first, previous, next, and last buttons.

Variants

Use variant to style inactive links and activeVariant to style the current page. They default to ghost and outline. PaginationPrevious, PaginationNext, PaginationFirst, and PaginationLast accept variant too, but not activeVariant, since they are never the current page.

Controlled with state

Pass render={<button />} to render the links as buttons and track the current page with useState. This is useful when pagination updates client state instead of navigating to a URL.

Page 1 of 20

Pass render={<Link href="..." />} to render the links with the Next.js Link component for client-side navigation.

API Reference

A link (or button, via render) for a single page. It is styled with buttonVariants.

Component type props
Prop
Type
Default
Expand prop details

The remaining props are forwarded to the rendered element.

PaginationPrevious and PaginationNext

Navigation links with a chevron icon and an optional text label. They accept the PaginationLink props except isActive and activeVariant, since they are never the current page.

Component type props
Prop
Type
Default
Expand prop details

PaginationFirst and PaginationLast

Icon-only links for jumping to the first or last page. They accept the PaginationLink props except isActive, activeVariant, and label.

Component type props
Prop
Type
Default
Expand prop details

Subcomponents

  • Pagination renders a <nav> with aria-label="pagination" and centers its content.
  • PaginationContent renders the <ul> that lays out the items.
  • PaginationItem renders an <li>.
  • PaginationEllipsis renders a non-interactive "more pages" marker.
  • PaginationSummary renders a <div> with muted text, for content such as "Page 1 of 20".

Each accepts the props of the element it renders, including className.

ZBMui

Built by the ZBM.

© 2026 ZBM ui. All rights reserved.