AI Primitives
AI Primitives
DocsIntroductionInstallationOrbsAPI Reference

API Reference

16 orbs share one surface. Exceptions are listed — everything else is portable.

PropTypeDefaultDescription
sizenumber64Width/height px. orbSizes.xl is 64.
speednumber1Multiplier.
pausedbooleanfalseFreeze phase.
colorstring--orb-fgOverrides --orb-fg. Alpha ignored, static across themes.
classNamestringundefinedForwarded to CanvasContainer.
styleReact.CSSPropertiesundefinedMerged as {width,height,...style} — your style wins.
aria-labelstringper-orb default (e.g. "Cloning")Overrides the default; omit only with visible text nearby.
valuenumberundefinedProgressOrb only: 0–1 controlled.

Exceptions

MiniOrb takes no speed/paused (static dot when done). StreamingText takes no className/style. OrbitOrb is legacy and undocumented.

StreamingText

PropTypeDefault
textstring"Every thought gathers, turns, and settles into a clear answer."
sizenumber320
speednumber1
pausedbooleanfalse
colorstringundefined
align"left" | "center" | "right""left"
loopbooleanfalse
orbbooleantrue
aria-labelstringundefined

Helpers

SymbolSignatureExample
orbSizes{xs:16,sm:24,md:32,lg:48,xl:64,"2xl":96} as const<CloningOrb size={orbSizes.xl} />
resolveOrbSize(size?: number | OrbSizePreset) => numberresolveOrbSize("xl") // 64
MiniOrb{done=false,size=16}<MiniOrb done size={16} aria-label="Tool done" />
drawGlobe(ctx, color, opts: GlobeOpts) => voiddrawGlobe(ctx, "#e6edf3", {cx, cy, radius: 4, spin: 0.6})

Accessibility

Canvas sets role="img" only when aria-label is present — otherwise no role. Pass a label when the orb carries meaning:

Usage
import { PushingOrb } from "@ai-primitives-ui/ui";
<PushingOrb size={64} aria-label="Pushing changes" />;

prefers-reduced-motion renders a static frame automatically. If decorative, omit the label and pair with visible text.

Orbs

16 orbs + StreamingText — the full product on one page.

On this page

API ReferenceStreamingTextHelpersAccessibility