Skip to content
Back

Slot textPro

Text and numbers that spin into their new value on reels stopping left to right, with a soft landing, speed blur, and reels that grow in or collapse when the length changes.

oxyn add slot-text
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

  • Text and numbers that spin into their new value on reels: digits roll through 0–9 plus spins extra turns, other changed characters flip, reels stop left to right stagger_ms apart after duration_ms with a fast start and a soft landing that never passes the target; blur follows each reel's speed; new characters grow in and removed ones collapse; reels match from the end for numbers so $999 → $1,000 only spins digits; changing the value mid-spin restarts from what is on screen. group formats en-US.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Slot text 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 slot-text

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

Number

Grouped numbers, reels matched from the end.

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

Money

$999 → $1,000 only spins digits.

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

Status

Words flip from the start.

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

SlotReels

PropTypeDefaultDescription
modelrequiredSlotText—Model.
nowrequiredClockMs—Shared clock.
announceboolDefault::default()Announce new values politely.
reducedboolDefault::default()Reduced motion: values swap instantly.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—Not interactive (the button belongs to the demo)

Accessibility

  • The value is the accessible name; with announce it is a polite status.
From the spec
  • The value is the accessible name; with announce a polite status.

Motion & interaction

Timing
  • Reduced motion: no rise, blur or stagger; labels and values swap instantly (slot reels land at once, the shimmer band stops and the text stays muted).

Responsive behaviour

  • Font size and colour come from the parent.
Edge cases (spec)
  • Inherits font size and colour.

Notes for AI

  • Import SlotReels from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: SlotTextEl in oxyn_gpui.
  • Props to set first: model, 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