Back to components
ElementNavigationFree

Dot Pager Indicator React component

Dots that show where you are in a carousel or onboarding flow: the active dot stretches into a pill, a progress style fills the pill and moves on by itself like stories, and a window style shows five dots out of many and shrinks the edge ones. Clickable and keyboard friendly.

About the Dot Pager Indicator component

Dot Pager Indicator is a row of dots that shows which page of a carousel, an onboarding flow or a gallery is on screen. It comes in three variants: pill, where the active dot stretches into a pill, progress, where the active pill fills over time and then moves on by itself like a story, and window, which shows only a few dots at a time and slides the row as you move through many pages.

count sets the number of pages and value or defaultValue the current one, zero-based, with onValueChange reporting changes. In the default interactive mode each dot is a button that jumps to its page, with arrow keys, Home and End. interactive={false} turns it into a read-only indicator that announces "n of count" to screen readers. size picks sm, md or lg, duration sets the time per page for progress, and visible the number of dots in window mode.

When to use it

Use Dot Pager Indicator under carousels, onboarding flows, stories and image galleries to show position and let people jump between pages.

For numbered steps with titles, use Stepper or Vertical Progress Steps; for long lists of pages, use Pagination.

Installation

Add the Dot Pager Indicator component to your project with the shadcn CLI. It lands in components/dot-pager-indicator.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/dot-pager-indicator

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Vertical Progress Steps
Free
Side Tab Menu
Free
Language Switcher
Free
Scrollspy Anchor Links
Free
Timeline
Free
Tree View
Free