AI Orb
NewCustomize
Listening
Size240px
Ocean
Speed1.00×
Softness1.00×
Grain1.0×
Installation
npx shadcn@latest add https://uibrik.com/r/ai-orb.jsonAdd the cn helper
Imports
cnfrom@/lib/utils, whichshadcn initcreates. Add it by hand without shadcn.Copy the source into your project
components/uibrik/ai-orb/ai-orb.tsx"use client"; // An assistant orb: a glass sphere filled with a living mesh gradient. Up to // five pools of colour drift over a deep base, warped by noise so their borders // flow, and blend smoothly without ever leaving a gap. Glass shading gives it // volume: a darker limb, a thin bright rim and a caustic where light focuses // at the bottom. Everything happens inside the // orb; nothing glows past its edge. // rest slow drift and a gentle breath // listening ripples run inward and the bright pools swell with the voice // thinking the colours wind into a turning vortex // speaking ripples push outward and the orb pulses with each syllable // `level` drives listening and speaking from a real input (mic volume); // without it, a speech-like rhythm is simulated. One WebGL pass. Sleeps off // screen, renders fewer pixels on low-end devices, holds still for reduced motion. import { useEffect, useRef } from "react"; import { cn } from "@/lib/utils"; export type AiOrbMode = "rest" | "listening" | "thinking" | "speaking"; // One-hue themes: a deep base, then five shades from dark to light. Each ramp // drifts in hue a little (darks warmer or cooler than lights) so it reads rich // rather than flat. For several hues, pass your own `colors`.
Adds the files to
components/uibrik/ai-orb. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/ai-orb.Usage
import { AiOrb } from "@/components/uibrik/ai-orb/ai-orb";<AiOrb mode="listening" size={240} palette="ocean" speed={1} softness={1} grain={1} followPointer // level={0} // label="…"/>Props
AiOrb- mode
- Type "rest" | "listening" | "thinking" | "speaking"
- "listening"
- What the assistant is doing. Clicking the demo orb steps through the modes too.
- size
- Type number
- 240
- Diameter. Shrinks to fit its container.
- palette
- Type "ocean" | "violet" | "rose" | "ember" | "amber" | "emerald" | "teal" | "graphite" | "custom"
- "ocean"
- A one-hue theme in hand-picked shades, or Custom for several hues.
- colors
- Type string[]
- ["#0e0a2c","#ff3d7f","#ff9a3c","#ffe066","#33e0c4","#5b6cff"]
- A base colour, then up to five pools, in any hues. Overrides the palette.
- speed
- Type number
- 1
- Motion speed.
- softness
- Type number
- 1
- How widely the colours blend into each other.
- grain
- Type number
- 1
- Film grain. 0 is perfectly smooth.
- followPointer
- Type boolean
- true
- Lean the colours and highlight toward the pointer (mouse and trackpad only).
- level
- Type number
- –
- Live voice level 0–1, e.g. microphone volume, for listening and speaking. Omit to simulate speech.
- label
- Type string
- –
- Read out to screen readers. Defaults to Assistant plus the mode.
- className
- Type string
- –
- Classes for the wrapper.