Ballmac UI home

AI Orb

A glass orb of drifting theme-colored light that shows whether the assistant is idle, listening, thinking or speaking, and swells with a live voice level.

Installation

$ pnpm dlx shadcn@latest add @ballmac/ai-orb

Usage

import { AiOrb } from "@/components/ballmac/ai-orb"

The full example is in the Code tab above.

Examples

Reacting to voice level

API reference

PropTypeDefault
state

What the assistant is doing. Each state changes how fast the colors drift and how the orb breathes.

OrbState"idle"
level

Live voice level from 0 to 1. While listening or speaking the orb swells with it.

number0
label

Accessible name. Defaults to a sentence built from `state`. Pass `null` when text next to the orb already says it, which hides the orb from assistive tech.

string | null—
size"sm" | "default" | "lg" | "xl""default"

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Screen readersrole=img named 'Assistant is listening' and so on. Pass label={null} to hide it when text beside it says the same
Reduced motionStatic orb, no drift or breathing

Use with AI

state is idle | listening | thinking | speaking. Pass level (0 to 1) to make it swell with audio. size is sm | default | lg | xl. Colors come from chart-1 to chart-5, so it follows the theme. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI AI Orb (@ballmac/ai-orb) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • The face of a voice assistant or a full-screen chat
  • A status mark beside an assistant's name

Not for

  • A plain spinner (use spinner)
  • Anything that must be readable as text; pair it with thinking-indicator

Registry JSON: https://ui.ballmac.com/r/ai-orb.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils