Pagination Sliding Active
Numbered pagination where the active pill springs between pages; deep in the range the numbers reel through the pill instead, and each ellipsis jumps five pages.
paginationpageslayoutellipsisspring
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/pagination-sliding-active.tsx.
$pnpm dlx shadcn@latest add "https://pixelpapa.com/r/pagination-sliding-active.json"Manual install+
1. Install the dependencies.
$pnpm add lucide-react motion2. Copy the code from the Code tab above into your project. It imports the cn helper from @/lib/utils, which every shadcn project already has.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
AI prompt
Paste into Claude, Cursor, v0 or Lovable
Add the "Pagination Sliding Active" component from PixelPapa UI to this project. What it is: Numbered pagination where the active pill springs between pages; deep in the range the numbers reel through the pill instead, and each ellipsis jumps five pages. Category: Pagination. Depends on: lucide-react, motion. 1. Install it with the shadcn CLI: npx shadcn@latest add "https://pixelpapa.com/r/pagination-sliding-active.json" (If the CLI is unavailable, fetch that URL, write files[0].content to components/pixelpapa/pagination-sliding-active.tsx and install the listed dependencies.) 2. Import it from "@/components/pixelpapa/pagination-sliding-active" and place it where I describe below. 3. Keep its animation timings and accessibility attributes. Replace the demo copy and data with content that fits my product, and use my existing theme tokens (bg-background, text-foreground, bg-primary, border-border) rather than hard-coded colours. Where to use it: <describe the page and position here>
More pagination
- Pagination Dots MorphDot pagination where the active dot stretches into a pill with a spring and, on autoplay, fills like a story timer before handing over to the next dot.
- Pagination Infinite Scroll SentinelInfinite scrolling driven by an IntersectionObserver sentinel: shimmer rows appear as you near the end, new rows fade up, and a progress hairline tracks how much is loaded.
- Pagination Jump InputPagination built around an editable page field: type a number and press Enter to jump, out-of-range values shake and reset, and a scrubber shows where you are.
- Pagination Load MoreA load-more list: the button morphs into a spinner, skeleton rows hold the space, then the new items stagger in and the list scrolls to meet them.
- Pagination Prev Next CompactA compact previous/next pager with a page-of-total readout whose number rolls up or down in the direction you are paging.