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-textThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add slot-textUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Number
Grouped numbers, reels matched from the end.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Money
$999 → $1,000 only spins digits.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Status
Words flip from the start.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
SlotReels
| Prop | Type | Default | Description |
|---|---|---|---|
modelrequired | SlotText | — | Model. |
nowrequired | ClockMs | — | Shared clock. |
announce | bool | Default::default() | Announce new values politely. |
reduced | bool | Default::default() | Reduced motion: values swap instantly. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| — | 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
SlotReelsfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
SlotTextElinoxyn_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.