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 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 |
|---|---|---|---|
| checked | boolean | off | On or off. Fires change with detail.checked when the user toggles it. |
| indeterminate | boolean | off | Shows a dash: some of the items it stands for are selected. Cleared when the user clicks. |
| label | string | — | Text next to the box; clicking it toggles too. Without a label, set aria-label. |
| shape | 'square' | 'round' | 'square' | Round reads as a to-do or a choice. |
| size | number (px) | 24 | Box size; the label text scales with it. |
| theme | 'light' | 'dark' | 'light' | White porcelain or a dark well. |
| name / value | string | — | Form field name and value: submitted with the surrounding form when checked. |
| disabled | boolean | off | Dims it and ignores input. |
| sound | boolean | off | A porcelain tap, a little higher when it turns on (plus a tap of vibration on phones). Also on for everything inside an element with data-ui-sound="on". |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Glow and check colours, or a custom tint. Free build ships Aurora only. |
There is a real <input type="checkbox"> inside, so Space toggles it, Tab reaches it, forms submit it and screen readers announce it as a checkbox with its label. Everything is CSS — no WebGL, no canvas — so a long list of them costs nothing. Reduced motion keeps the tile and the glow and drops the pop and the drawn stroke.
More components
- Tide Slide
- Pearl Code
- Pearl Dial
- Nova Rating
- Pearl Input
- Pearl Select
- Pearl Accordion
- Pearl Calendar
- Pearl Chip
- Glass Dock
- Pearl Slider
- Pearl Segmented
- 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