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 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 |
|---|---|---|---|
| <option> | children | — | The choices, written like a native select: text is the label, value="…" the value, disabled greys one out. From script: el.options = [{ value, label }]. |
| value | string | '' | The chosen value. Fires change with detail.value when the user picks another. |
| label | string | — | Lies in the field and lifts above the value once something is chosen. Without a label, set aria-label. |
| placeholder | string | 'Select…' | Shown while nothing is chosen, when there is no label. |
| width | number (px) | CSS width | 300 | Field width; the list matches it. |
| size | number (px) | 54 | Field height; the text and the rows scale with it. |
| theme | 'light' | 'dark' | 'light' | White porcelain or a dark well. |
| name | string | — | Form field name: a hidden input carries the value into the surrounding form. |
| disabled | boolean | off | Dims it and ignores input. |
| sound | boolean | off | A porcelain tap on open and on choice. Also on for everything inside an element with data-ui-sound="on". |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Colours of the light and the check, or a custom tint. Free build ships Aurora only. |
It is a button with a listbox: Enter, Space or the arrows open it, the arrows and Home / End move, typing a letter jumps to the option that starts with it, Enter chooses and Escape closes. The list drops upward when there is no room below. It is positioned inside the component, so a parent with overflow: hidden will clip it — give that parent room or let it overflow. Same height and material as Pearl Input, so they line up in one form. All CSS, no WebGL.
More components
- Tide Slide
- Pearl Code
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- 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