Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
A colorful glow that rises from the bottom edge of any element and blooms with a voice.
npx shadcn@latest add @pixel-ui-pro/voice-glowimport { useRef } from "react";import { VoiceGlow, useMicrophone } from "@/components/ui/voice-glow";export default function Demo({ thinking }: { thinking: boolean }) {const mic = useMicrophone();return (<><VoiceGlow stream={mic.stream} processing={thinking} className="w-[350px]"><input className="h-14 w-full rounded-2xl border px-4" placeholder="Ask anything" /></VoiceGlow><button onClick={mic.state === "live" ? mic.stop : mic.start}>{mic.state === "live" ? "Stop" : "Listen"}</button></>
The source comes with Pro. Install it with your license key and the file is yours to edit.
Get ProOptions you can pass to customize this component.
typedefaultpillmobileGeometry preset: a chat input, a small recording pill, or the bottom of a phone screen. Sets the default reach and blur.
streamMediaStreamnullAudio to react to, usually from useMicrophone. Wins over level.
levelnumber | (() => number)Input from 0 to 1 when there is no stream. Pass a function to have it read every frame.
processingbooleanGathers the glow into one beam that sweeps side to side.
colorVariantcolorfulmonooceansunsetforestcandyicegoldNamed palette for the lobes.
colorsstring[]Your own lobe colors, up to 7. Overrides colorVariant.
bandColors{ core?: string; above?: string; mid?: string; below?: string }Extra bands: core is a bright line on the edge, mid a band just above it, above a haze higher up, and below a spill under the element. Each shows only when set.
sensitivitynumberGain applied to the input before the threshold.
thresholdnumberInput below this, from 0 to 1, is treated as silence.
attacknumberSeconds the glow takes to rise toward a louder input.
releasenumberSeconds the glow takes to fall back after the input drops.
reachnumberHow high the glow can climb, as a share of the element's height. Defaults to 0.9, 1 or 0.4 for default, pill and mobile.
spreadnumberHow far apart the lobes sit across the width, from 0 to 1.
flownumberHow fast and far the lobes drift and wobble, from 0 to 1.
bendnumberHow much shorter the lobes are toward the sides, from 0 to 1.
idlenumberHeight the glow rests at during silence, from 0 to 1.
themeautodarklightditherdark lightens what it covers, light paints over it, auto follows the dark class. dither draws the glow in 4 pixel dots that thin out toward its edges.
strengthnumberOpacity of the effect, from 0 to 1.
activebooleanTurn off to fade the glow out.
pausedbooleanFreezes the glow where it is.
scalenumberMultiplies the size and blur of the lobes.
classNamestringClasses applied to the root, which wraps your element.