uibrik

Page Indicator

Preview

Customize

Total48
Visible11
Start page6
Drag step14px
Stretch30px

Usage

import { PageIndicator } from "@/components/uibrik/page-indicator/page-indicator";

<PageIndicator />

Installation

npx shadcn@latest add https://uibrik.com/r/page-indicator.json
Adds the files to components/uibrik/page-indicator and installs @number-flow/react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/page-indicator.

Props

PageIndicator
total
Type number
48
Number of pages.
visible
Type number
11
Dashes shown at once.
defaultPage
Type number
6
Starting page when uncontrolled.
dragStep
Type number
14
Drag distance per page while scrubbing.
stretch
Type number
30
How far the grabbed dash stretches past either end.
showNumber
Type boolean
true
Show the number pill; click it to type a page.
onChange
Type (page: number) => void
–
Called when the page changes.
className
Type string
–
Classes for the wrapper.