AI Primitives
AI Primitives
DocsIntroductionInstallationOrbsAPI Reference

Installation

Add the package

npm install @ai-primitives-ui/ui

Zero runtime deps — peer react ^18 || ^19. Works with Tailwind 4, shadcn, or no CSS at all (fallback #c9d1d9).

Render an orb

Usage
import { CloningOrb } from "@ai-primitives-ui/ui";

export function CloningIndicator() {
  return <CloningOrb size={64} aria-label="Cloning repository" />;
}

Every orb: size, speed, paused, color, className/style, aria-label. ProgressOrb adds value={0..1}.

Theme once

globals.css
@import "tailwindcss";
@import "@ai-primitives-ui/ui/src/styles.css";
:root {
  --orb-fg: var(--foreground, var(--fg-default));
}

Resolution order: color prop → --orb-fg → --foreground → --fg-default → #c9d1d9. A color prop is static and ignores theme flips.

shadcn hosts

Orbs are Tailwind-free and inherit hsl(var(--foreground)) via the bridge above. Optional preset: import preset from "@ai-primitives-ui/ui/tailwind-preset". Registry copy-paste (verified: one command typechecks clean):

npx shadcn@latest add https://ai-primitives-ui.vercel.app/r/cloning-orb.json

then import { CloningOrb } from "@/components/orbs/loading/CloningOrb". Files mirror the package layout under components/orbs/, so all 28 items resolve with no extra installs.

Introduction

Monochrome Canvas 2D orbs for AI interfaces — zero deps.

Orbs

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

On this page

InstallationAdd the packageRender an orbTheme once