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 with TypeScript types, the shared WebGL core and the GLSL source
- Sunset, Mint and Mono tints, plus custom three-colour tints
- Microphone meter: with
micthe orb follows the real input level while it listens - The vanilla Web Component with every tint, a demo page, README and license
Attributes & props
| Name | Type | Default | Description |
|---|---|---|---|
| state | 'idle' | 'listening' | 'thinking' | 'speaking' | 'idle' | What the assistant is doing. States blend into each other over about half a second; nothing snaps. |
| level | 0..1 | built-in pattern | Loudness: your recogniser’s input level while listening, your speech output while speaking. Leave it out and the orb moves in a quiet pattern of its own. |
| size | number (px) | 120 | Diameter of the sphere. The glow reaches about 60% of that further out and takes no layout space. |
| theme | 'light' | 'dark' | 'light' | Milky glass with coloured plasma for light pages; dark glass with glowing plasma for dark ones. |
| label | string | 'Voice assistant' | Accessible name of the button. |
| toggle | boolean | off | Web Component only: a press switches state between idle and listening by itself. In React, leave state out for the same behaviour. |
| speed | number | 1 | Speed of all motion. 0 freezes it. |
| disabled | boolean | off | Dims the orb and ignores presses. |
| press | event | Click, Enter or Space on the orb. detail.state is the current state. React: onPress. | |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | 'aurora' | Plasma colours. Free build ships Aurora only. |
| mic Pro | boolean | off | Reads the real microphone level while state is listening. The browser is asked for the microphone only after the first press, never on load; a refusal fires micerror. Audio stays in the page. |
The orb is a button: it takes focus, answers Enter and Space, and reports aria-pressed while it listens. It does not run speech recognition; it shows what your assistant is doing, so set state from your own code and pass level if you have one. The filaments are three sheets of noise wound round the centre; thinking winds the same sheets tighter instead of cutting to another picture, which is why the change reads as one motion. Listening sends rings in from the rim and speaking sends light out past the glass, so the two never look alike at a glance. Leave room around it for the glow. Reduced motion freezes the plasma but still shows each state; without WebGL a CSS sphere stands in. All library components on a page share one WebGL context.
More components
- Stream Text
- Voice Wave
- Plush Buddy
- Gummy Agent
- Mercury Orb
- Prompt Input
- Voice Orb
- Alien Face
- Tide Slide
- Pearl Code
- Ink Sphere
- Frost Card
- Holo Card
- Lens Compare
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Glass Toast
- Pearl Select
- Glass Sheet
- Pearl Accordion
- Glass Tip
- Pearl Calendar
- Glass Nav
- Pearl Tabs
- Glass Command
- Halo Avatar
- Pearl Steps
- Pearl Skeleton
- Pearl Table
- Pearl Chip
- Pearl Empty
- Roll Counter
- Glass Marquee
- Reveal Text
- Mesh Gradient
- Silk Waves
- Dot Field
- 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
- Glass Dock
- Pearl Slider
- Pearl Segmented
- Liquid Metal Button
- Aurora Ring
- Glass Toggle
- Firefly Button
- Pearl Button
- Pearl Loader
- Prism Button
- Liquid Carousel
- Orbit Carousel
- Deck Carousel