AI orb

A glowing ball of light for an assistant, in your colour. It rests, sends out rings while it listens and spins faster while it thinks. Press it to see each state.

Options

Size
Colour

Code

import "./ai-orb.css";

/* state is "idle", "listening" or "thinking". The colour follows --dh-accent,
   and the size follows the font-size of whatever the orb sits in.

   <AiOrb state="thinking" /> */
export function AiOrb({ state = "idle", label = "Assistant", ...props }) {
  return (
    <button className="dh-orb" type="button" data-state={state} aria-label={label + ", " + state} {...props}>
      <span className="dh-orb-ball">
        <i />
        <i />
        <i />
      </span>
    </button>
  );
}