oxyn

Circle Await: a loader for waiting for approval

A dim circle of dots with a slow heartbeat at the center. A React loader for an AI agent waiting on user approval or permission.

Installation

Install with the shadcn CLI, or copy the component file. It only needs React.

npx shadcn@latest add https://oxyn.space/r/circle-await.json

Usage

Updates live with the parameters you set.

import { CircleAwait } from "@/components/circle-await";

export function Thinking() {
  return (
    <CircleAwait />
  );
}

Props

PropTypeDefaultDescription
dotShape"round"|"square""round"Shape of each dot.
dotSizenumber2.5Resting dot size in px.
scalenumber1.5How many times larger a dot grows at the peak of the animation.
densitynumber11Dots across the width of the sheet.
sizenumber160Width and height of the orb in px.
durationnumber2.4Seconds for one heartbeat: the double beat, then the rest it settles into.
gapnumber0.6Extra seconds to rest between heartbeats.
minOpacitynumber0.25Opacity of resting dots. The whole sheet sits at this while it waits; the center dot is fully opaque at the beat.
colorstring"#e4e4e7"Dot color.
pausedbooleanfalseCoast to a stop on the current frame without unmounting. Turning it off eases back up to speed.
labelstring"Thinking"Accessible name; the wrapper is role="status".
className / style——Spread onto the wrapper div, along with any other div props.

Switch states

Circle Await is one of the animations in Dot Circle. Use the group when the agent's state changes, and it morphs between them.

More states