Code
In context
Install · Free Web Component
One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.
The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:
Pro · React + TypeScript Pro
One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.
- React component (controlled with
page/onChange, or uncontrolled withdefaultPage) with TypeScript types and the full source - Sunset, Mint and Mono tints, plus custom tints from Brand Fit
- The vanilla Web Component with every tint, a demo page, README and license
Attributes & props
| Name | Type | Default | Description |
|---|---|---|---|
| total | number | 1 | Number of pages (not rows): divide your row count by the page size and round up. |
| page | number | 1 | The current page, from 1. Fires change with detail.page when the user picks another; the attribute follows. |
| siblings | number | 1 | Pages shown on each side of the current one. The control always holds siblings × 2 + 5 places (first, last, two gaps and the window), so its width never changes while you page. |
| size | number (px) | 40 | Diameter of one page; the type, the bead and the arrows scale with it. |
| aria-label | string | 'Pagination' | Accessible name of the navigation — name what is being paged when a screen has more than one. |
| theme | 'light' | 'dark' | 'light' | For a light or a dark page; the component has no background of its own. |
| sound | boolean | off | A porcelain tap, higher when you move forward. Also on for everything inside an element with data-ui-sound="on". |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Colours of the light around the bead, or a custom tint. Free build ships Aurora only. |
A navigation landmark of real buttons: each page is labelled “Page 7”, the current one carries aria-current="page", and the previous / next arrows turn aria-disabled at the ends. With focus anywhere inside, Left and Right step a page (mirrored in right-to-left pages), Home and End jump to the first and the last — focus stays on the current page as the numbers change. The gaps are not buttons. The component only reports the page: fetch or slice your data in the change listener. For a short, known sequence of steps Pearl Steps reads better; pagination is for a list of unknown length. All CSS, no WebGL. Reduced motion swaps the roll for a fade and moves the bead at once.
More components
- Glass Nav
- Pearl Tabs
- Glass Command
- Glass Tabbar
- Glass Sidebar
- Pearl Breadcrumb
- Tide Slide
- Pearl Code
- Ink Sphere
- Frost Card
- Holo Card
- Stream Text
- Lens Compare
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Glass Toast
- Pearl Select
- Glass Sheet
- Pearl Accordion
- Glass Tip
- Pearl Calendar
- Halo Avatar
- Pearl Steps
- Pearl Skeleton
- Pearl Table
- Pearl Chip
- Pearl Empty
- Roll Counter
- Glass Marquee
- Reveal Text
- Mesh Gradient
- Silk Waves
- Dot Field
- Plasma Orb
- Voice Wave
- Plush Buddy
- Gummy Agent
- Glass Menu
- Pearl Pricing
- Glass Bento
- Quote Wall
- Glass Cta
- Magnet Button
- Beam Border
- Spotlight Card
- Scratch Reveal
- Glass Dock
- Pearl Slider
- Pearl Segmented
- Liquid Metal Button
- Mercury Orb
- Prompt Input
- Voice Orb
- Aurora Ring
- Glass Toggle
- Firefly Button
- Pearl Button
- Pearl Loader
- Alien Face
- Prism Button
- Liquid Carousel
- Orbit Carousel
- Deck Carousel