# Components Pagination: Floating Pagination

A pagination bar that hovers above the content with soft elevation. Stays visible while readers scroll through long articles, feeds, or paginated galleries.

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

## Install

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

## Depends on

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

## About this block

Floating Pagination sits inside a scrollable container and sticks to the
bottom of the visible area as the user scrolls through content. The
pagination bar itself is a pill-shaped surface with a card background,
a border, and a drop shadow that lifts it clear of the content beneath
it. Inside the pill sit rounded previous and next controls, individual
page number buttons, an ellipsis to skip the middle range, and a jump
to the last visible page number.

The page numbers, ellipsis, and the total page count are all independent.
You can adjust how many numbered items appear, move the ellipsis, or
change which page is marked active without touching the container or the
sticky positioning. The surrounding content area is also entirely
separate, so the block drops into any scrollable feed, list, or result
set you already have.

## When to use

Use this block when your paginated content lives inside a bounded
scrollable region and you want the navigation always in reach without a
fixed header or footer claiming space. It suits a developer tools product
well: a docs search results panel, a package listing, or an API
reference feed where engineers scroll through entries and need to jump
pages without losing their place in the viewport.

A natural flow around it on a Components page:

**Before**

- [Breadcrumbs](https://www.shadcn-ui-blocks.com/blocks/components/breadcrumbs) to show the user where
  they are within a deep section before they start paging through results
- [Badges](https://www.shadcn-ui-blocks.com/blocks/components/badges) labeling the result set or filter
  state above the list

**After**

- [Cards](https://www.shadcn-ui-blocks.com/blocks/components/cards) to wrap individual result items that
  the pagination is stepping through
- [Compact Pagination](https://www.shadcn-ui-blocks.com/blocks/components/pagination/compact-pagination)
  if you need a lighter fallback for narrow panels where the full pill
  does not fit

## What you can customize

The pill bar is the composable unit. Swap its contents to match your
result set:

- **Page range and ellipsis.** Adjust which numbered pages appear and
  where the ellipsis sits to reflect the real depth of your data set.
- **Active page indicator.** Mark whichever page is current as active so
  the filled button always reflects the user's position in the sequence.
- **Container height and content.** The scrollable wrapper is independent
  of the sticky bar, so you can set any height and drop in your real list
  or feed without changing the pagination behavior.

> Tip: keep the visible page numbers to four or five at most so the pill
> stays narrow and readable on smaller viewports.

## 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)
- [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)
