Mischief

60 / Agent UI

Orb

A sphere that carries what an assistant is doing, settled when idle and moving with the voice when there is one.

idle

Installation

Copy the source into your project, or keep it behind a package.

npx shadcn@latest add Tinkerers-Labs/mischief-ui/orb
import { Orb } from "mischief-ui/orb"

Or paste it in yourself. The source imports the shared cn helper from @/lib/utils, so point that at your own copy.

registry/default/orb/orb.tsx
"use client" import * as React from "react" import {  RenderSurface,  useThemeColors,  type SurfaceColor,} from "@/registry/default/render-surface/render-surface"import { cn } from "@/lib/utils" export type OrbState = "idle" | "listening" | "thinking" | "speaking" export type OrbProps = Omit<

Usage

export function Assistant() {
  return <Orb state={state} level={level} />
}

Four states, four paces

Idle settles, listening breathes, thinking turns over faster, and speaking moves with the voice. The pace is the difference: a reader learns which is which in a few seconds without a legend.

Only listening and speaking read the level. The other two keep their own rhythm, so a stale level left over from a finished turn cannot make a thinking orb pulse as though somebody were talking.

Feeding it a level

level is a number between nought and one, and it is read inside the frame loop rather than through a re-render. Handing it sixty values a second from an analyser costs one canvas frame, not sixty renders of the tree around it.

API

state"idle" | "listening" | "thinking" | "speaking"What the assistant is doing. Defaults to "idle".
levelnumberHow loud it is now, nought to one.
colorstringA theme token or CSS colour. Defaults to "--primary".
sizenumberWidth and height in pixels. Defaults to 120.
labelstringSaid aloud in place of the state name.

Accessibility

The orb is a drawing, so what it means is also written: the state, or a label of your own, is announced through a polite live region. Nothing about the assistant's condition is carried by the animation alone, which matters because the animation is exactly what a reduced-motion setting or a sleeping surface will take away. The canvas itself is hidden from assistive technology.