Skip to content
Back

AI sparkPro

A little star glyph that signals machine work: four long points and four short paler ones swell gently when resting, send a wave round while thinking, pulse while writing and draw together when finished, always easing from wherever they were.

oxyn add ai-spark
Ready
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 compact animated mark that says an AI is at work, for buttons, pills, avatars and inline status.

When not to use

Installation

AI spark 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-spark

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

The mark with its pill and avatar.

Ready
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

Pill thinking

The pill, thinking (Oxyn extra: ink tone).

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

Error

Couldn't finish: short rays, dim diagonals, red.

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

AiSpark

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
statusStringDefault::default()`idle`, `thinking`, `writing`, `done`, `error`; empty plays the loop.
variantString"mark"`mark`, `pill` or `avatar`.
sizef32Default::default()Size in px; 0 picks a default per variant (mark 24, pill 16, avatar 20).
toneString"violet"`ink`, `muted` or `violet`.
labelStringDefault::default()Pill text instead of the status word.
speedf321.0Speed multiplier.
pausedboolDefault::default()Freeze.
announcebooltrueAnnounce status changes (off for decorative copies).
pickerboolDefault::default()Status chips (Oxyn extra).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—Purely an indicator and never focused; place buttons like Stop next to it.

Accessibility

  • The root is a polite status region announcing changes once (AI is thinking); aria-busy while working.
  • Every state has a distinct silhouette as well as movement, failure adds red, and the pill spells the state out.
  • Decorative copies set announce off so only one spark speaks.
From the spec

A polite status region announcing changes once (AI is thinking) with aria-busy while working; decorative copies turn announce off. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Every status is a function of time and of the ray's angle, so loops have no seam; a change blends from the pose on screen. The pill label crossfades.

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 mssmoothstep
Idle breath6.4 ssine
Thinking ripple1.1 ssine
Writing beat0.9 sgaussian pulses

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

Responsive behaviour

  • One footprint for every status, so text around it never shifts.
  • Geometry is in a 100-unit box and stays crisp from 12 px up.
Edge cases (spec)

One footprint for every status; crisp from 12 px up (100-unit geometry). Tones: violet, ink, muted. 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 AiSpark 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