Xzero UI
Pro library

Cube mascotPro

An isometric cube mascot where three shaded faces and a painted-on face show what the assistant is doing. It turns a quarter turn in eased steps while thinking, prints lines onto the floor while writing, settles with a sparkle when done, and shakes once on error.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/cube-mascot
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/cube-mascot

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { CubeMascot, type CubeStatus } from "@/components/xzero/cube-mascot/cube-mascot";

// Inline next to a streaming reply
export function ReplyHeader({ phase }: { phase: "waiting" | "streaming" | "complete" | "failed" }) {
  const status: CubeStatus = phase === "streaming" ? "writing" : phase === "complete" ? "done" : phase === "failed" ? "error" : "thinking";
  return (
    <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
      <CubeMascot status={status} size={24} name="Atlas" />
      <span>Atlas</span>
    </div>
  );
}

// Empty state on an image canvas while it generates
<CubeMascot status={generating ? "thinking" : "idle"} size={144} name="Atlas" announce />

// Brand colored body with light features
<CubeMascot status="writing" size={64} color="#4f6bff" faceColor="white" />

API reference

CubeMascot

An isometric cube character drawn in SVG from real 3D math: a rounded silhouette, three faces shaded by how they face the light, and a face painted on the front side through its projected plane. Idle tilts, floats and blinks. Thinking turns the cube a quarter turn in eased steps, and the face fades in on the side that arrives at the front. Writing tips the face down while lines print onto the ground in front of it. Done settles with a happy squint and a sparkle. Error shakes once and shows worried brows. Status changes blend from the pose on screen over 420ms, never a hard cut.

PropTypeDefaultDescription
status"idle" | "thinking" | "writing" | "done" | "error"–What the assistant is doing. Leave unset to play through every state on a loop (the docs demo).
sizenumber96Width and height in px, from 24 (inline next to a message) to 160 (empty state). Below 56 a compact drawing takes over: a larger cube in the frame, bolder eyes, no mouth, shadow or printed lines.
colorstring–Any CSS color for the cube body. Defaults to the accent. The top and shaded side are mixed from it.
faceColorstring–Any CSS color for the eyes, brows and mouth. Defaults to the accent foreground.
groundbooleantrueThe contact shadow and the lines printed while writing. Drawn at 56px and up.
pausedbooleanfalseFreeze on the current frame. The cube also pauses by itself off screen and in background tabs, and resumes without a jump.
namestring"Assistant"Used in the accessible label, for example "Atlas, thinking".
labelstring–Overrides the whole accessible label.
announcebooleanfalseAnnounce status changes in a polite live region. Turn it on for the one mascot that carries status, not for decorative copies.
onStatusChange(status: CubeStatus) => void–Called when the self-playing loop (status unset) moves to the next state. Use it to sync a caption or a control.
classNamestring–Class on the root span. Set --cube-body, --cube-ink, --cube-top, --cube-front, --cube-side, --cube-line, --cube-shadow or --cube-sparkle here to restyle.
styleCSSProperties–Inline style on the root span.

Keyboard interactions

KeysAction
NoneThe mascot is a status image and takes no focus. Pair it with a real control when people act on what it shows.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in ai

Guidance for AI tools

Cube mascot: An isometric cube mascot where three shaded faces and a painted-on face show what the assistant is doing. It turns a quarter turn in eased steps while thinking, prints lines onto the floor while writing, settles with a sparkle when done, and shakes once on error. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components