About
Show a glassy orb that follows the person's voice, swirls while thinking, and pulses with the reply.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Audio Orb to your project and fits it to your theme.
Code
How Audio Orb is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import AudioOrb, { type AudioOrbState } from "@/components/ui/honest-audio-orb";
interface AudioOrbSettings {
state: AudioOrbState;
colors: string[];
speed: number;
grain: number;
paused: boolean;
}
const defaults: AudioOrbSettings = {
state: "speaking",
colors: ["#f3f1ff", "#8a94ff", "#272a63"],
speed: 1,
grain: 0.5,
paused: false,
};
const STATES = [
{ label: "Idle", value: "idle" },
{ label: "Listening", value: "listening" },
{ label: "Thinking", value: "thinking" },
{ label: "Speaking", value: "speaking" },
] as const;
/** A speech-like level: syllables inside words inside phrases, scaled by `loudness`. */
function useSimulatedVoice(loudness: number) {
const loudnessRef = React.useRef(loudness);
React.useEffect(() => {
loudnessRef.current = loudness;
});
return React.useCallback(() => {
const t = performance.now() / 1000;
const syllables = 0.55 + 0.45 * Math.abs(Math.sin(t * 9.1) * Math.sin(t * 3.7 + 1.3));
const words = Math.max(0, Math.sin(t * 2.3) * 0.6 + 0.55);
const phrase = Math.sin(t * 0.55) > -0.6 ? 1 : 0.1;
return Math.min(1, syllables * words * phrase * loudnessRef.current);
}, []);
}
export default function AudioOrbDemo() {
const settings = defaults;
const [loudness, setLoudness] = React.useState(0.8);
const level = useSimulatedVoice(loudness);
return (
<div className="flex min-h-[420px] w-full items-center justify-center p-6">
<div className="h-80 w-full max-w-xl overflow-hidden rounded-xl">
<div className="grid size-full place-items-center">
<div className="size-full max-w-[22rem]">
<AudioOrb {...settings} inputLevel={level} outputLevel={level} />
</div>
</div>
</div>
</div>
);
}
















