# Components Pagination: Compact Pagination

A tight pagination row that fits page numbers, prev, and next into a small footprint. Good for sidebars, panels, and dense admin tables with limited space.

- Page: https://www.shadcn-ui-blocks.com/blocks/components/pagination/compact-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/compact-pagination.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/components-pagination-compact-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-compact-pagination.json"`.

## Depends on

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

## About this block

Compact Pagination is a tight horizontal row of controls. A left chevron
sits at one end, a right chevron at the other, and five numbered page
links fill the space between them. Every control shares the same small
square footprint, and the active page is visually distinguished so a
reader knows their position without scanning.

Because every element is the same size, the row fits naturally into
constrained spaces like sidebars, panel footers, and dense data tables.
The page count, the active page index, and the link targets are all
independent so you can adjust any of them without affecting the others.

## When to use

Reach for this block in a product analytics dashboard where screen
real estate is split across charts, metric cards, and filter panels.
When a paginated results table lives inside a panel that shares the
viewport with other data, a full-width pagination row would dominate
the footer. This compact layout keeps navigation present without
competing with the surrounding content.

A natural flow around it on a Components page:

**Before**

- A [Breadcrumbs](https://www.shadcn-ui-blocks.com/blocks/components/breadcrumbs) row to show which
  section or filter the results belong to
- A [Cards](https://www.shadcn-ui-blocks.com/blocks/components/cards) grid displaying the paginated
  data items above the controls

**After**

- A [Badges](https://www.shadcn-ui-blocks.com/blocks/components/badges) group to surface status counts
  or filter chips alongside the results

## What you can customize

Drop this control below any paginated surface and swap out the values
to match your data:

- **Page count.** Add or remove numbered links to reflect the total
  number of pages in your result set.
- **Active state.** Mark whichever page number is currently selected
  as active so users always know where they are in the sequence.
- **Navigation targets.** Point each link and the chevron buttons at
  the correct page routes or handler functions for your application.

> Tip: if your result set can grow beyond ten pages, pair this block
> with a [Mini Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/mini-pagination)
> variant that shows only the current page and step arrows to avoid
> the row overflowing its container.

## 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)
- [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)
- [Responsive Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/responsive-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)
