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, icons in chips) 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 |
|---|---|---|---|
| <button> | children | — | One child per chip: its text (or any HTML, e.g. an svg icon) is the label, value="…" the value. selected starts it on, removable adds the × bead, disabled greys it out. After adding buttons from script call el.refresh(). |
| mode | 'filter-multiple' | 'filter-single' | 'static' | 'filter-multiple' | Any number of chips on, one at most, or plain tags that cannot be selected (set it before the element connects). |
| value | comma-separated string | '' | The selected values. As a property it is a string[]. Fires change with detail.value (string[]). |
| size | number (px) | 32 | Chip height; the type, the check and the × scale with it. |
| label | string | — | Accessible name of the group, e.g. "Filter by topic". |
| name | string | — | Form field name: one hidden input per selected value goes into the surrounding form. |
| theme | 'light' | 'dark' | 'light' | White porcelain or dark. |
| sound | boolean | off | A porcelain tap, higher when a chip turns on. Also on for everything inside an element with data-ui-sound="on". |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Colours of the light inside a chosen chip, or a custom tint. Free build ships Aurora only. |
One element is a whole group (role="group"). Filter chips are toggle buttons with aria-pressed; the group is one Tab stop and the arrows, Home and End move between chips, Space or Enter toggles, Backspace or Delete removes a removable chip. In static mode chips are plain text and only their × buttons take focus. A removed chip collapses first, then remove fires with detail.value and the element drops it; el.removeChip(value) does the same from script. The text stays dark on the light glaze and white on the dark one, so a chosen chip is always readable. All CSS, no WebGL.
More components
- Tide Slide
- Pearl Code
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Pearl Select
- Pearl Accordion
- Pearl Calendar
- 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