115 Components

Pagination

Navigation

Kinetic spring-animated pagination component featuring a sliding active selection capsule, smart ellipsis windowing, jump-to-page input, and full arrow-key keyboard navigation.

NewSpring PhysicsShared LayoutWAI-ARIA
/r/pagination.json

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionlucide-reactclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/pagination.json"

Props

TypeScript props supported by <Pagination />.

7 props
PropTypeDefaultDescription
totalPagesnumber10Total number of pages available.
currentPagenumber1Controlled current active page number (1-indexed).
siblingCountnumber1Number of page buttons displayed on each side of the active page.
showControlsbooleantrueWhether to render previous and next chevron buttons.
showEdgeControlsbooleantrueWhether to render first and last skip buttons.
showQuickJumperbooleanfalseWhether to display the direct page jump numeric input.
onPageChange(page: number) => void—Callback invoked whenever the active page changes.

Key Features

  • Shared layoutId active selection pill that fluidly glides across page numbers with spring physics.
  • Smart ellipsis windowing with interactive fast-forward / rewind preview buttons.
  • First, previous, next, and last page skip controls with disabled tactile states.
  • Optional direct jump-to-page input with boundary validation.
  • Optional total items range counter ('Showing 1-10 of 120 items').
  • Reduced motion fallback with immediate zero-latency transitions.

Keyboard & Accessibility

  • Complies with WAI-ARIA Pagination design pattern with semantic <nav role='navigation'>.
  • Provides aria-current='page' on the active page button and descriptive aria-labels on controls.
  • Full keyboard navigation: ArrowLeft, ArrowRight, Home, and End keys cycle through pages.
  • High-contrast focus-visible rings for keyboard users.