Skip to content
Back

AI mascotPro

Oxyn's own assistant: a soft square head with a glowing bulb on an antenna. Resting it bobs and looks around; it grows a little to hear you, gazes upward while the bulb orbits as it thinks, follows its own pen line as it writes, beams when finished and jolts with a red bulb when something breaks.

oxyn add ai-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

  • Give an assistant a face that shows what it is doing, for empty states, chat headers and loading moments.
  • Oxyn's own character: a rounded head with an antenna orb.

When not to use

Installation

AI 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 ai-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 violet

Thinking, violet (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

Done at 112 px with a 24 / 40 / 64 ladder (Oxyn extra).

Atlas, done
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

AiMascot

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
statusStringDefault::default()`idle`, `listening`, `thinking`, `writing`, `done`, `error`; empty plays the loop.
sizef3296.0Width and height, px (24 to 160; under 56 draws the compact framing).
toneString"ink"`ink`, `soft` or `violet`.
groundbooltrueThe contact shadow and writing line (56 px and up).
pausedboolDefault::default()Freeze the current frame.
nameString"Assistant"Name in the label (`Atlas, thinking`).
announceboolDefault::default()Speak each status change (politely) for screen readers.
pickerboolDefault::default()Status chips and Pause under it (Oxyn extra).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—A status image: it takes no focus. The demo's chips and Pause are ordinary buttons.

Accessibility

  • The drawing is role img with a label from name and status (Atlas, thinking) that follows every change.
  • 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 status changes the face, not only motion or colour. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

The orb rests on the antenna, pulses while listening, circles the head (passing behind it) while thinking, turns red on an error and becomes a sparkle when done. Eyes move with the gaze; blush shows when happy.

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

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

Responsive behaviour

  • Always a square of the given size, so nothing around it moves; vector shapes stay sharp at any zoom.
  • Under 56 px a tighter framing with larger eyes keeps it readable at 24 px.
Edge cases (spec)

A fixed square of size px that never reflows its parent; under 56 px a tighter framing with larger eyes. Tones: ink, soft, violet. 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 AiMascot 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