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.
1. Install with one command — or download the file
2. Load it and use the element
3. React + TypeScript (optional)
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 or uncontrolled) with TypeScript types, the shared WebGL core and the GLSL 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 |
|---|---|---|---|
| sound | boolean | off | Plays a short synthesised porcelain tap (and a tap of vibration on phones) when used. Also on for everything inside an element with data-ui-sound="on". |
| options | string[] | { value, label, disabled }[] | — | Two to five options. In HTML, put <option> elements inside. |
| value | string | first option | The selected option. Fires change when it moves. |
| size | number (px) | 48 | Height; the text and padding scale with it. |
| theme | 'light' | 'dark' | 'light' | White porcelain or a dark groove. |
| equal | boolean | false | Gives every option the same width. |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Halo colours, or a custom tint. Free build ships Aurora only. |
A radio group: one tab stop, arrow keys, Home and End move the selection, and every option is a real button. Press and slide across it and the pearl follows your finger. Reduced motion moves the pearl without the stretch. The groove and the pearl are CSS, so without WebGL only the halo is missing. All library components on a page share one WebGL context.
More components
- Tide Slide
- Pearl Code
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Pearl Select
- Pearl Accordion
- Pearl Calendar
- Pearl Chip
- Glass Dock
- Pearl Slider
- Aurora Ring
- Glass Toggle
- Pearl Loader
- Ink Sphere
- Frost Card
- Holo Card
- Stream Text
- Lens Compare
- Glass Toast
- Glass Sheet
- Glass Tip
- Glass Nav
- Pearl Tabs
- Glass Command
- Halo Avatar
- Pearl Steps
- Pearl Skeleton
- Pearl Table
- Pearl Empty
- Roll Counter
- Glass Marquee
- Reveal Text
- Mesh Gradient
- Silk Waves
- Dot Field
- Plasma Orb
- Voice Wave
- Plush Buddy
- Gummy Agent
- Glass Tabbar
- Glass Menu
- Pearl Pricing
- Glass Bento
- Quote Wall
- Glass Cta
- Magnet Button
- Beam Border
- Spotlight Card
- Scratch Reveal
- Glass Sidebar
- Pearl Pagination
- Pearl Breadcrumb
- Liquid Metal Button
- Mercury Orb
- Prompt Input
- Voice Orb
- Firefly Button
- Pearl Button
- Alien Face
- Prism Button
- Liquid Carousel
- Orbit Carousel
- Deck Carousel