Pagination

Animated pagination with spring-based active page indicator and ellipsis for large ranges.

Open in v0

Last updated: March 29, 2026

Simple (5 pages) - Page 1

With ellipsis (20 pages) - Page 10

Installation

npx smoothui-cli add pagination

Features

  • Previous/next navigation buttons
  • Page numbers with smart ellipsis for large ranges
  • Spring-animated active page indicator
  • Controlled component with page and onPageChange
  • Configurable sibling count
  • Respects reduced motion preferences

Accessibility

Keyboard Interactions

KeyDescription
TabMoves focus between pagination buttons
Enter / SpaceActivates the focused page button

ARIA Attributes

AttributeElementPurpose
role="navigation"<nav>Identifies as navigation landmark
aria-label="Pagination"<nav>Provides accessible name
aria-current="page"Active page buttonIndicates the current page
aria-label="Go to page N"Page buttonsDescriptive label for each page
aria-label="Go to previous/next page"Prev/next buttonsDescriptive label for navigation

Reduced Motion

When prefers-reduced-motion is enabled, the active page indicator appears instantly without spring animation.

Props