Skip to content
Back

Cube mascotPro

An isometric cube with three shaded sides and a painted face: it tilts and blinks at rest, turns a quarter at a time while thinking with the face moving to the side in front, prints lines on the floor while writing, and sparkles when done.

oxyn add cube-mascot
Atlas, idle
Atlas, idle
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A geometric assistant for technical products: an isometric cube with a face painted on its front side.

When not to use

Installation

Cube mascot is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add cube-mascot

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Loop

Plays every status in turn.

Atlas, idle
Atlas, idle
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Thinking ink

Thinking, ink (Oxyn extra).

Atlas, thinking
Atlas, thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Sizes

Writing with a size ladder (Oxyn extra).

Atlas, writing
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

CubeMascot

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
statusStringDefault::default()Status; empty plays the loop.
sizef3296.0Size, px.
toneString"violet"`ink`, `soft` or `violet`.
groundbooltrueThe contact shadow and printed lines.
pausedboolDefault::default()Freeze.
nameString"Assistant"Name in the label.
announceboolDefault::default()Announce status changes.
pickerboolDefault::default()Status chips and Pause (Oxyn extra).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—A status image: it takes no focus.

Accessibility

  • The drawing is role img labelled with the name and status (Atlas, writing).
  • With announce on, status changes are read in a polite live region outside the image; use it on one character per view.
  • Each status also changes the expression (eyes widen, lift, drop, squint with joy, brows knit), so meaning never rests on movement or colour.
  • Reduced motion keeps each status's face and drops the loops.
From the spec

role img labelled with name and status; optional polite announcements. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Eight real 3D corners are turned and projected each frame; the three visible sides are sorted by depth and shaded top, front and side; the face is mapped onto its side.

Timing

Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.

TransitionDurationEasing
Status blend420 ms (BLEND_MS)ease-in-out
Loop step2800 ms per status (STEP_MS)—
Blink140 ms every 3.6 slinear
Error shake700 ms, decayingsine
Quarter turnhold 0.5 s, turn 0.8 sease-in-out

Reduced motion: loops and travel stop; each state shows its end pose and its words.

Responsive behaviour

  • A fixed square; the sides are real 3D corners projected each frame.
  • Under 56 px the cube is framed tighter with larger eyes.
Edge cases (spec)

A fixed square; under 56 px a tighter framing. Tones: violet, ink, soft. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the official coloured brand and model marks.

Notes for AI

  • Import CubeMascot from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView in oxyn_gpui.
  • Props to set first: now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI