# Components Pagination: Responsive Pagination

Pagination that shows full page numbers on desktop and collapses to arrows on mobile. Keeps navigation usable across phones, tablets, and wide screens.

- Page: https://www.shadcn-ui-blocks.com/blocks/components/pagination/responsive-pagination
- Collection: [Components](https://www.shadcn-ui-blocks.com/blocks/components), Free tier
- Group: [Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/components/pagination/responsive-pagination.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/components-pagination-responsive-pagination
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/components-pagination-responsive-pagination.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: button, pagination
- Installs to: `@/components/blocks/components/pagination/responsive-pagination`

## About this block

Responsive Pagination renders three distinct layouts inside a single
component, each visible at a different breakpoint. On mobile, a left
chevron, a plain "Page 2 of 8" text label, and a right chevron are
the only controls shown, keeping the footprint as small as possible.
On tablet, the row expands to show labeled Previous and Next buttons
flanking a short run of page numbers (1, 2, 3) followed by an
ellipsis and the last page. On desktop, the full sequence appears:
five numbered pages, an ellipsis, the final page, and both labeled
direction buttons. The active page is highlighted at every breakpoint.

The page count, active page, and total shown at each breakpoint are
all independent. You can change the copy in the mobile label, add or
remove numbered items in the tablet and desktop rows, and adjust
the ellipsis position without the three layouts affecting each other.

## When to use

This layout is the right choice whenever your course catalog, lesson
list, or search results page needs navigation that works equally well
for a student on a phone between classes and a teacher reviewing
content on a wide monitor. The three tier approach means you never
force mobile users to tap through a long row of numbers, and desktop
users always see where they are in a deep result set. The
[compact pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/compact-pagination)
variant is a better fit when space is always tight regardless of
screen width; reach for this block when the experience should scale
up as screen real estate grows.

A natural flow around it on a Components page:

**Before**

- A [cards group](https://www.shadcn-ui-blocks.com/blocks/components/cards) showing the course or
  lesson tiles that the pagination controls
- [Breadcrumbs](https://www.shadcn-ui-blocks.com/blocks/components/breadcrumbs) to orient learners
  within a course or subject category

**After**

- A [split pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/split-pagination)
  if you want to offer a prev/next layout for article style content
  directly below the grid

## What you can customize

The block covers three viewports with a single drop in, and each
layer can be tuned independently:

- **Mobile label.** Replace "Page 2 of 8" with any current and total
  page values your data provides so the text always reflects real
  state.
- **Tablet page window.** Adjust how many numbered links appear
  between Previous and the ellipsis to match the depth of your
  result set and the tap target size you want.
- **Desktop sequence.** Extend or shorten the numbered run and move
  the ellipsis to reflect your total page count and the current
  position within it.

> Tip: wire the active page highlight and the mobile label to the
> same state variable so both update together when a learner navigates.

## More in Components Pagination

- [Bordered Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/bordered-pagination)
- [Card Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/card-pagination)
- [Compact Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/compact-pagination)
- [Dot Indicator Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/dot-indicator-pagination)
- [Floating Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/floating-pagination)
- [Icon Only Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/icon-only-pagination)
- [Mini Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/mini-pagination)
- [Rounded Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/rounded-pagination)
- [Shadow Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/shadow-pagination)
- [Split Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/split-pagination)
