Skip to content
Back

Pixel mascotPro

Oxyn's pixel robot: it idles, thinks under a bubble of dots, types on a keyboard, raises its arms under stars and crosses its eyes on an error, in sprite steps on a fixed clock, crisp at every whole-pixel scale.

oxyn add pixel-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 pixel-art assistant for playful products and retro themes: Oxyn's own robot on a 24 × 24 grid.

When not to use

Installation

Pixel 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 pixel-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

Writing violet

Writing, violet (Oxyn extra).

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

Scales

Done at 1×, 2×, 3× and 5× (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

PixelMascot

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
statusStringDefault::default()Status; empty plays the loop.
scaleu324Whole pixels per sprite pixel (1 to 8).
toneString"ink"`ink`, `soft` or `violet`.
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

  • A single image element named after the character and its state (Atlas, thinking), kept current.
  • 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

One SVG with role img and a label that follows the status; optional polite announcements; each status has its own shape. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Sprites step on a fixed clock in whole pixels; a status change shuts the eyes for two steps first, so it never cuts.

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
Sprite step120 ms (STEP)stepped
Bob2 steps up, 8 steps periodstepped
Change2 steps eyes shutstepped

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

Responsive behaviour

  • A fixed square of 24 × scale px; crisp edges at every whole scale.
  • Inline at scales 1 and 2, so it sits on a line of text.
Edge cases (spec)

A fixed square of 24 × scale px; crisp at every whole scale (crispEdges, merged runs). Inline at scales 1 and 2. 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 PixelMascot 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