AI Face
The agent character: a CSS face with nine moods, five shapes and any colour, as a portrait, a presence pill with a status ring, and a cursor tag for shared canvases.
"use client"
import * as React from "react"
import {
AiKitStyles,
AiStyle,
cx,
Face,
Mark,
Roll,
toneColor,
type AiMood,
type AiShape,
type AiStatus,
type AiTone,
type FaceProps,
} from "@/lib/ai-kit"
const CSS = `
.aik-fc-pill{display:inline-flex;align-items:center;gap:9px;height:44px;padding:0 14px 0 8px;border-radius:22px;background:var(--aik-card);box-shadow:var(--aik-sh-pop);max-width:100%}
.aik-fc-ring{position:relative;display:grid;place-items:center;inline-size:30px;block-size:30px;flex:none}
.aik-fc-ring .aik-face{--aik-fs:24px}
.aik-fc-ring::before{content:"";position:absolute;inset:0;border-radius:50%;border:1.75px solid color-mix(in oklab,var(--aik-c) 22%,transparent);transition:border-color var(--aik-d-state)}
.aik-fc-pill[data-s="run"] .aik-fc-ring::before{border-top-color:var(--aik-c);animation:aik-spin .9s linear infinite}
.aik-fc-pill[data-s="ask"] .aik-fc-ring::before{border:1.75px dashed var(--aik-c)}
.aik-fc-pill[data-s="done"] .aik-fc-ring::before,.aik-fc-pill[data-s="fail"] .aik-fc-ring::before{border-color:var(--aik-c)}
.aik-fc-pill b{font-weight:600;font-size:13.5px}
.aik-fc-sep{inline-size:1px;block-size:14px;background:var(--aik-line-2);flex:none}
.aik-fc-pill .aik-roll{inline-size:132px;font-size:13px;line-height:20px;color:var(--aik-c);font-weight:500;transition:color var(--aik-d-state)}
.aik-fc-time{font:11.5px var(--aik-mono);color:var(--aik-text-3);font-variant-numeric:tabular-nums}
.aik-fc-mem{display:grid;justify-items:center;gap:6px;inline-size:76px}
.aik-fc-av{position:relative;display:block}
.aik-fc-av .aik-face{--aik-fs:44px;display:block}
.aik-fc-av .aik-mark{position:absolute;right:-5px;bottom:-4px;box-shadow:0 0 0 2.5px var(--aik-panel);background:var(--aik-panel)}
.aik-fc-mem b{font-weight:500;font-size:12.5px;line-height:16px}
.aik-fc-mem .aik-roll{font-size:11.5px;line-height:15px;color:var(--aik-text-3);inline-size:76px;justify-items:center}
.aik-fc-cur{position:absolute;left:0;top:0;display:flex;align-items:flex-start;pointer-events:none;
transform:translate(calc(var(--x)*1cqw),calc(var(--y)*1px));transition:transform var(--aik-d-move) var(--aik-ease-move);will-change:transform}
.aik-fc-cur svg{inline-size:16px;block-size:16px;flex:none;fill:var(--aik-fc);stroke:#fff;stroke-width:1.2;stroke-linejoin:round;filter:drop-shadow(0 1px 1.5px rgb(0 0 0 / 30%))}
.aik-fc-tag{display:inline-flex;align-items:center;gap:6px;height:24px;margin:11px 0 0 -2px;padding:0 9px 0 4px;border-radius:4px 12px 12px 12px;background:var(--aik-card);box-shadow:var(--aik-sh-pop);font-size:12px;white-space:nowrap}
.aik-fc-tag .aik-face{--aik-fs:16px}
.aik-fc-tag b{font-weight:600}
.aik-fc-tag .aik-roll{color:var(--aik-text-2);line-height:16px}
.aik-fc-cur[data-s="ask"] .aik-fc-tag .aik-roll{color:var(--aik-amber);font-weight:500}
@media (prefers-reduced-motion: reduce){.aik-fc-cur{transition:none}}
.cp-status .aik-fc-time{margin-left:auto}
.aik-fc-cur{left:0;top:0}
`
/** The mood a face takes when only a status is known. */
export function moodForStatus(status: AiStatus): AiMood {
if (status === "run") return "work"
if (status === "ask") return "needs"
if (status === "done") return "happy"
if (status === "fail") return "oops"
return "sleep"
}
export type AiFaceProps = FaceProps
/** The agent character on its own. Nine moods, five shapes, any colour. */
export function AiFace({ className, ...props }: AiFaceProps) {
return (
<span className={cx("aik", className)} style={{ display: "inline-flex" }}>
<AiKitStyles />
<Face {...props} />
</span>
)
}
interface AgentLook {
/** Face colour: a named tone or any CSS colour. */
tone?: AiTone | (string & {})
shape?: AiShape
/** Overrides the mood derived from `status`. */
mood?: AiMood
}
export interface AiPresenceProps
extends AgentLook, Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
name: string
status: AiStatus
/** What the agent is doing right now. Rolls over in place when it changes. */
label: string
/** Elapsed time, already formatted. */
time?: string
}
/** A status pill: face with a status ring, name, a rolling label and a clock. */
export function AiPresence({
name,
status,
label,
time,
tone = "blue",
shape = "orb",
mood,
className,
...rest
}: AiPresenceProps) {
return (
<div
{...rest}
className={cx("aik aik-fc-pill", className)}
data-s={status}
role="status"
>
<AiKitStyles />
<AiStyle id="ai-face" css={CSS} />
<span className="aik-fc-ring">
<Face
mood={mood ?? moodForStatus(status)}
shape={shape}
tone={tone}
size={24}
/>
</span>
<b>{name}</b>
<span className="aik-fc-sep" />
<Roll>{label}</Roll>
{time ? <span className="aik-fc-time">{time}</span> : null}
</div>
)
}
export interface AiAvatarProps
extends AgentLook, Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
name: string
status: AiStatus
/** A short line under the name. */
label?: string
size?: number
}
/** A face with a status mark on its corner, a name and a short label. */
export function AiAvatar({
name,
status,
label,
size = 44,
tone = "blue",
shape = "blob",
mood,
className,
...rest
}: AiAvatarProps) {
return (
<div {...rest} className={cx("aik aik-fc-mem", className)}>
<AiKitStyles />
<AiStyle id="ai-face" css={CSS} />
<span className="aik-fc-av">
<Face
mood={mood ?? moodForStatus(status)}
shape={shape}
tone={tone}
size={size}
/>
<Mark status={status} />
</span>
<b>{name}</b>
{label ? <Roll>{label}</Roll> : null}
</div>
)
}
export interface AiCursorProps
extends AgentLook, Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
name: string
/** What the agent is doing at this spot. */
task: string
/** Offset from the positioned parent's top-left corner. Numbers are pixels. */
x: number | string
y: number | string
/** `ask` turns the task amber. */
status?: AiStatus
}
const unit = (value: number | string) =>
typeof value === "number" ? `${value}px` : value
/** An agent as a cursor with a name tag. Place it inside a `position: relative` parent. */
export function AiCursor({
name,
task,
x,
y,
status = "run",
tone = "blue",
shape = "orb",
mood,
className,
style,
...rest
}: AiCursorProps) {
return (
<div
{...rest}
className={cx("aik aik-fc-cur", className)}
data-s={status}
style={
{
"--aik-fc": toneColor(tone),
transform: `translate(${unit(x)}, ${unit(y)})`,
...style,
} as React.CSSProperties
}
>
<AiKitStyles />
<AiStyle id="ai-face" css={CSS} />
<svg viewBox="0 0 16 16" aria-hidden="true">
<path d="M2 1.5l11.2 5.3-4.7 1.5-1.7 4.7z" />
</svg>
<span className="aik-fc-tag">
<Face
mood={mood ?? moodForStatus(status)}
shape={shape}
tone={tone}
size={16}
/>
<b>{name}</b>
<Roll>{task}</Roll>
</span>
</div>
)
}
Installation
One command adds ai-face and the shared AI Kit layer it is built on (tokens, faces, marks and brand icons). No animation library, light and dark built in.
$npx shadcn@latest add https://tweenui.dev/r/ai-face.json
ai-face-demo
"use client"
import * as React from "react"
import { AiDemo } from "@/lib/ai-demo"
import {
AiStyle,
Face,
toneColor,
useAiLoop,
type AiMood,
type AiShape,
type AiStatus,
type AiTone,
} from "@/lib/ai-kit"
import { AiAvatar, AiCursor, AiPresence } from "@/registry/tween/ai-face"
const CSS = `
.aik-fc-moods{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:28px;align-items:center;width:min(100%,820px)}
.aik-fc-hero{display:grid;justify-items:center;gap:16px;text-align:center}
.aik-fc-cap{display:grid;gap:2px;min-height:42px}
.aik-fc-cap b{font:600 15px/20px var(--aik-sans);letter-spacing:-.01em;text-transform:capitalize}
.aik-fc-cap span{color:var(--aik-text-2);font-size:13px;line-height:18px}
.aik-fc-pick{display:grid;gap:10px;justify-items:center}
.aik-fc-dots{display:flex;gap:8px}
.aik-fc-dots button{inline-size:20px;block-size:20px;border-radius:50%;background:var(--aik-fc);box-shadow:inset 0 0 0 1px rgb(0 0 0 / 12%);transition:transform var(--aik-d-press) var(--aik-ease-out),box-shadow var(--aik-d-state)}
.aik-fc-dots button:active{transform:scale(.9)}
.aik-fc-dots button[aria-pressed="true"]{box-shadow:0 0 0 2px var(--aik-panel),0 0 0 3.5px var(--aik-fc)}
.aik-fc-shapes button{padding:0 7px}
.aik-fc-shapes .aik-face{--aik-fs:16px;--aik-fc:var(--aik-text-3)}
.aik-fc-shapes .aik-face::after{display:none}
.aik-fc-shapes [aria-pressed="true"] .aik-face{--aik-fc:var(--aik-text)}
.aik-fc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.aik-fc-grid button{display:grid;justify-items:center;gap:8px;width:100%;padding:14px 6px 10px;border-radius:14px;color:var(--aik-text-2);font-size:12.5px;font-weight:500;text-transform:capitalize;
transition:background var(--aik-d-state),color var(--aik-d-state),box-shadow var(--aik-d-state),transform var(--aik-d-press) var(--aik-ease-out)}
.aik-fc-grid button:hover{background:var(--aik-hover)}
.aik-fc-grid button:active{transform:scale(.97)}
.aik-fc-grid button[aria-pressed="true"]{background:var(--aik-raised);color:var(--aik-text);box-shadow:inset 0 0 0 1px var(--aik-line-2)}
.aik-fc-grid .aik-face{--aik-fs:44px}
@container (max-width:600px){.aik-fc-moods{grid-template-columns:minmax(0,1fr);gap:20px}.aik-fc-grid .aik-face{--aik-fs:38px}}
.aik-fc-pres{display:grid;gap:26px;justify-items:center;width:100%}
.aik-fc-team{display:flex;gap:22px;flex-wrap:wrap;justify-content:center}
.aik-fc-canvas{position:relative;width:min(100%,400px);height:236px;border-radius:16px;background:var(--aik-sunk);box-shadow:inset 0 0 0 1px var(--aik-line);container-type:inline-size;overflow:hidden}
.aik-fc-blk{position:absolute;display:grid;gap:7px;align-content:start;padding:6px;border-radius:9px;box-shadow:0 0 0 1.5px transparent;transition:box-shadow var(--aik-d-state) var(--aik-ease-out),background var(--aik-d-state)}
.aik-fc-blk i{display:block;height:8px;border-radius:4px;background:var(--aik-line-3)}
.aik-fc-blk[data-t="h"] i{height:13px;border-radius:5px;background:var(--aik-text-3)}
.aik-fc-blk[data-t="img"]{background:var(--aik-line-2);padding:0;overflow:hidden}
.aik-fc-blk[data-t="img"]::after{content:"";position:absolute;inset:0;opacity:0;transition:opacity var(--aik-d-move) var(--aik-ease-out);
background:radial-gradient(80% 90% at 20% 20%,var(--aik-f-amber),transparent 60%),radial-gradient(90% 90% at 85% 80%,var(--aik-f-rose),transparent 62%),var(--aik-f-violet)}
.aik-fc-blk[data-t="img"][data-made]::after{opacity:1}
.aik-fc-blk[data-t="btn"]{background:var(--aik-text);border-radius:9px;place-items:center;padding:0}
.aik-fc-blk[data-t="btn"] i{inline-size:46%;height:7px;background:var(--aik-panel)}
.aik-fc-blk[data-on]{box-shadow:0 0 0 1.5px var(--on);background:color-mix(in oklab,var(--on) 9%,transparent)}
.aik-fc-blk[data-t="img"][data-on],.aik-fc-blk[data-t="btn"][data-on]{box-shadow:0 0 0 2px var(--aik-panel),0 0 0 3.5px var(--on)}
.aik-fc-blk[data-t="btn"][data-on]{background:var(--aik-text)}
.aik-fc-blk[data-on][data-busy] i{animation:aik-fc-sweep 1s ease-in-out infinite alternate}
.aik-fc-blk[data-on][data-busy] i:nth-child(2){animation-delay:.12s}
.aik-fc-blk[data-on][data-busy] i:nth-child(3){animation-delay:.24s}
@keyframes aik-fc-sweep{to{opacity:.35}}
.aik-fc-canvas{position:relative}
.aik-fc-shapes{display:inline-flex;padding:2px;border-radius:10px;background:var(--aik-sunk);box-shadow:inset 0 0 0 1px var(--aik-line)}
.aik-fc-shapes button{display:grid;place-items:center;height:28px;border-radius:8px;transition:background var(--aik-d-state),transform var(--aik-d-press)}
.aik-fc-shapes button:active{transform:scale(.94)}
.aik-fc-shapes button[aria-pressed="true"]{background:var(--aik-card);box-shadow:var(--aik-sh-card)}
.aik-fc-shapes i{display:block;width:16px;height:16px;border-radius:32%;background:var(--aik-text-3);transition:background var(--aik-d-state)}
.aik-fc-shapes [aria-pressed="true"] i{background:var(--aik-text)}
.aik-fc-shapes i[data-shape="orb"]{border-radius:50%}
.aik-fc-shapes i[data-shape="blob"]{border-radius:58% 42% 46% 54%/52% 60% 40% 48%}
.aik-fc-shapes i[data-shape="arch"]{border-radius:50% 50% 30% 30%/60% 60% 30% 30%}
.aik-fc-shapes i[data-shape="leaf"]{border-radius:62% 38% 62% 38%/58% 42% 58% 42%}
`
const MOODS: Array<[AiMood, string]> = [
["idle", "Glances around, blinks now and then"],
["think", "Looks up and away while it reasons"],
["work", "Squints and scans from side to side"],
["needs", "Eyes wide, looking straight at you"],
["listen", "Tall, attentive eyes while you speak"],
["talk", "Eyes bounce in time with the reply"],
["happy", "Smiling eyes when a run lands"],
["oops", "A flat wince and a small shake"],
["sleep", "Closed and breathing when paused"],
]
const TONES: AiTone[] = [
"blue",
"violet",
"green",
"amber",
"rose",
"teal",
"ink",
]
const SHAPES: AiShape[] = ["blob", "squircle", "orb", "arch", "leaf"]
function MoodSet() {
const root = React.useRef<HTMLDivElement>(null)
const [index, setIndex] = React.useState(0)
const [picked, setPicked] = React.useState(false)
const [tone, setTone] = React.useState<AiTone>("blue")
const [shape, setShape] = React.useState<AiShape>("blob")
const [mood, line] = MOODS[index] ?? MOODS[0]!
useAiLoop(
root,
async ({ sleep }) => {
await sleep(700)
setIndex((current) => (current + 1) % MOODS.length)
},
{ gap: 1500, enabled: !picked, still: () => setIndex(2) }
)
return (
<div className="aik-fc-moods" ref={root}>
<div className="aik-fc-hero">
<Face mood={mood} shape={shape} tone={tone} size={112} />
<div className="aik-fc-cap">
<b>{mood}</b>
<span>{line}</span>
</div>
<div className="aik-fc-pick">
<div className="aik-fc-dots" role="group" aria-label="Colour">
{TONES.map((item) => (
<button
key={item}
type="button"
aria-label={item}
aria-pressed={item === tone}
style={{ "--aik-fc": toneColor(item) } as React.CSSProperties}
onClick={() => setTone(item)}
/>
))}
</div>
<div className="aik-fc-shapes" role="group" aria-label="Shape">
{SHAPES.map((item) => (
<button
key={item}
type="button"
aria-label={item}
aria-pressed={item === shape}
onClick={() => setShape(item)}
>
<i data-shape={item} />
</button>
))}
</div>
</div>
</div>
<div className="aik-fc-grid" role="group" aria-label="Mood">
{MOODS.map(([item], at) => (
<button
key={item}
type="button"
aria-pressed={at === index}
onClick={() => {
setPicked(true)
setIndex(at)
}}
>
<Face mood={item} shape={shape} tone={tone} size={44} />
<span>{item}</span>
</button>
))}
</div>
</div>
)
}
interface Member {
status: AiStatus
label: string
mood?: AiMood
}
const TEAM = [
{ name: "Odo", tone: "violet", shape: "blob" },
{ name: "Juno", tone: "amber", shape: "arch" },
{ name: "Pim", tone: "green", shape: "leaf" },
] as const
const PRESENCE_STEPS: Array<{
pill: [AiStatus, string, AiMood?]
team: [Member, Member, Member]
}> = [
{
pill: ["run", "Thinking", "think"],
team: [
{ status: "run", label: "Writing tests" },
{ status: "todo", label: "Queued" },
{ status: "run", label: "Planning", mood: "think" },
],
},
{
pill: ["run", "Reading 4 files"],
team: [
{ status: "run", label: "Writing tests" },
{ status: "todo", label: "Queued" },
{ status: "run", label: "Editing" },
],
},
{
pill: ["ask", "Needs your OK"],
team: [
{ status: "run", label: "Writing tests" },
{ status: "run", label: "Reviewing" },
{ status: "run", label: "Editing" },
],
},
{
pill: ["run", "Shipping the fix"],
team: [
{ status: "done", label: "Done" },
{ status: "ask", label: "Needs you" },
{ status: "run", label: "Editing" },
],
},
{
pill: ["done", "Done in 0:16"],
team: [
{ status: "done", label: "Done" },
{ status: "ask", label: "Needs you" },
{ status: "done", label: "Done" },
],
},
]
function Presence() {
const root = React.useRef<HTMLDivElement>(null)
const [step, setStep] = React.useState(0)
const [seconds, setSeconds] = React.useState(0)
useAiLoop(
root,
async ({ sleep }) => {
for (let at = 0; at < PRESENCE_STEPS.length; at++) {
setStep(at)
for (let tick = 0; tick < 4; tick++) {
setSeconds(at * 4 + tick)
await sleep(520)
}
}
},
{ gap: 900, still: () => setStep(2) }
)
const current = PRESENCE_STEPS[step] ?? PRESENCE_STEPS[0]!
const [status, label, mood] = current.pill
return (
<div className="aik-fc-pres" ref={root}>
<AiPresence
name="Mira"
status={status}
label={label}
mood={mood}
time={
status === "done"
? undefined
: `0:${String(seconds).padStart(2, "0")}`
}
/>
<div className="aik-fc-team">
{TEAM.map((agent, at) => {
const member = current.team[at]!
return (
<AiAvatar
key={agent.name}
name={agent.name}
tone={agent.tone}
shape={agent.shape}
status={member.status}
label={member.label}
mood={member.mood}
/>
)
})}
</div>
</div>
)
}
type Block = "h" | "p" | "img" | "btn"
interface Scene {
mira: { x: string; y: number; task: string; mood?: AiMood; ask?: boolean }
odo: { x: string; y: number; task: string; mood?: AiMood }
on: Partial<Record<Block, string>>
busy?: Block
made?: boolean
}
const SCENES: Array<[number, Scene]> = [
[
1500,
{
mira: { x: "30cqw", y: 26, task: "Reading the hero", mood: "think" },
odo: { x: "26cqw", y: 196, task: "Making the image" },
on: { h: "blue", img: "violet" },
},
],
[
1700,
{
mira: { x: "30cqw", y: 26, task: "Rewriting the headline" },
odo: { x: "26cqw", y: 196, task: "Image ready", mood: "happy" },
on: { h: "blue" },
busy: "h",
made: true,
},
],
[
2100,
{
mira: { x: "40cqw", y: 92, task: "Tightening the copy" },
odo: { x: "12cqw", y: 150, task: "Checking contrast", mood: "think" },
on: { p: "blue" },
busy: "p",
made: true,
},
],
[
2400,
{
mira: {
x: "60cqw",
y: 172,
task: "Publish this?",
mood: "needs",
ask: true,
},
odo: { x: "12cqw", y: 150, task: "Waiting for Mira", mood: "idle" },
on: { btn: "amber" },
made: true,
},
],
]
function Cursors() {
const root = React.useRef<HTMLDivElement>(null)
const [at, setAt] = React.useState(0)
useAiLoop(
root,
async ({ sleep }) => {
for (let index = 0; index < SCENES.length; index++) {
setAt(index)
await sleep(SCENES[index]![0])
}
},
{ gap: 700, still: () => setAt(2) }
)
const scene = (SCENES[at] ?? SCENES[0]!)[1]
const block = (kind: Block) => {
const color = scene.on[kind]
return {
"data-t": kind,
"data-on": color ? "" : undefined,
"data-busy": scene.busy === kind ? "" : undefined,
"data-made": kind === "img" && scene.made ? "" : undefined,
} as const
}
const tint = (kind: Block): React.CSSProperties | undefined => {
const color = scene.on[kind]
if (!color) return undefined
return {
"--on": color === "amber" ? "var(--aik-amber)" : toneColor(color),
} as React.CSSProperties
}
return (
<div className="aik-fc-canvas" ref={root}>
<div
className="aik-fc-blk"
{...block("h")}
style={{ left: "6%", top: 16, width: "58%", ...tint("h") }}
>
<i />
</div>
<div
className="aik-fc-blk"
{...block("p")}
style={{ left: "6%", top: 50, width: "84%", ...tint("p") }}
>
<i />
<i />
<i style={{ width: "64%" }} />
</div>
<div
className="aik-fc-blk"
{...block("img")}
style={{
left: "6%",
top: 118,
width: "42%",
height: 96,
...tint("img"),
}}
/>
<div
className="aik-fc-blk"
{...block("btn")}
style={{
left: "56%",
top: 150,
width: "32%",
height: 34,
...tint("btn"),
}}
>
<i />
</div>
<AiCursor
name="Mira"
task={scene.mira.task}
x={scene.mira.x}
y={scene.mira.y}
mood={scene.mira.mood ?? "work"}
status={scene.mira.ask ? "ask" : "run"}
/>
<AiCursor
name="Odo"
tone="violet"
shape="blob"
task={scene.odo.task}
x={scene.odo.x}
y={scene.odo.y}
mood={scene.odo.mood ?? "work"}
/>
</div>
)
}
export function AiFaceDemo({ only }: { only?: string }) {
return (
<>
<AiStyle id="ai-face-demo" css={CSS} />
<AiDemo
only={only}
tabs={[
{ name: "Mood set", node: <MoodSet /> },
{ name: "Presence", node: <Presence /> },
{ name: "Cursor tag", node: <Cursors /> },
]}
/>
</>
)
}
Installation
Usage
import { AiAvatar, AiCursor, AiFace, AiPresence } from "@/components/ui/ai-face"<AiFace mood="think" shape="blob" tone="violet" size={64} />
<AiPresence name="Mira" status="run" label="Reading 4 files" time="0:04" />
<AiAvatar name="Odo" tone="violet" status="ask" label="Needs you" />
<div className="relative h-60">
<AiCursor name="Mira" task="Rewriting the headline" x={120} y={26} />
</div>Versions
AiFaceis the character on its own. The eyes are one masked element, so it stays crisp from 16px to a full portrait.AiPresenceis a status pill. The ring spins while working, turns dashed and amber when the agent needs you, and the label rolls over in place.AiAvataradds a status mark on the corner, a name and a short label.AiCursoris an agent as a cursor with a name tag. It glides to each newxandy.
When you pass only a status, the face picks a matching mood: working squints and scans, needs-you looks straight at you, done smiles, failed winces, queued sleeps.
Props
AiFace
| Prop | Type | Default | Description |
|---|---|---|---|
mood | "idle" | "think" | "work" | "needs" | "listen" | "talk" | "happy" | "oops" | "sleep" | "idle" | What the eyes act out. |
shape | "blob" | "squircle" | "orb" | "arch" | "leaf" | "blob" | Body shape. |
tone | "blue" | "violet" | "green" | "amber" | "rose" | "teal" | "ink" | string | "blue" | A named tone or any CSS colour. |
size | number | 40 | Edge length in pixels. |
AiPresence
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | The agent's name. | |
status | "todo" | "run" | "ask" | "done" | "fail" | Drives the ring, the colour and the default mood. | |
label | string | What the agent is doing. Rolls when it changes. | |
time | string | Elapsed time, already formatted. | |
mood | mood | Overrides the mood derived from status. |
AiAvatar takes name, status, an optional label, and size. AiCursor takes name, task, x, y (numbers are pixels) and an optional status. All four accept tone and shape.