ToasterPro
Calm toasts from anywhere: a stack that fans out on hover, promise toasts that morph from spinner to check, a timer hairline that pauses while you read, swipe or Escape to dismiss.
oxyn add toasterHover the stack to fan it out · F8 focuses the newest
- Run 247 finished12 files changed · 148 tests passed
- Approval neededAtlas wants to push to main
- Indexing repository…atlas · 3,412 files
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.
Rendered from Rust at build time · goes live when visible
When to use
- Short-lived confirmations and background results: a draft saved, a file moved with Undo, an upload that resolves, a sync that failed.
- They must not cover the work or demand attention.
When not to use
- Notice cards stacked behind each other: use Notification Stack instead.
- A persistent message that helps people recover or continue: use Alert instead.
- Fourteen text-glyph loaders (braille, sand, blocks, scanner…) that settle into a check, a warning or a cross when the agent finishes, waits or fails: use Glyph loader instead.
Installation
Toaster 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 toasterUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Stack
Three toasts, collapsed.
Hover the stack to fan it out · F8 focuses the newest
- Run 247 finished12 files changed · 148 tests passed
- Approval neededAtlas wants to push to main
- Indexing repository…atlas · 3,412 files
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Expanded
Fanned out into a list.
Hover the stack to fan it out · F8 focuses the newest
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Top center
From the top, staying until dismissed.
Hover the stack to fan it out · F8 focuses the newest
- Run 247 finished12 files changed · 148 tests passed
- Approval neededAtlas wants to push to main
- Indexing repository…atlas · 3,412 files
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Empty
Press the buttons to send toasts.
Hover the stack to fan it out · F8 focuses the newest
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
Toaster
| Prop | Type | Default | Description |
|---|---|---|---|
position | String | "bottom-right" | `top-left` · `top-center` · `top-right` · `bottom-left` · `bottom-center` · `bottom-right`. |
inline | bool | Default::default() | Positioned inside the nearest positioned ancestor (20 px offset). |
duration | u32 | 4000 | Time on screen ms (0 = until dismissed). |
visible | usize | 3 | Toasts visible at once. |
expand | bool | Default::default() | Always fanned out. |
offset | Option<f32> | Default::default() | Distance from the edges px (24, inline 20). |
gap | f32 | 10.0 | Gap when fanned out px. |
hotkey | String | "F8" | Key that focuses the newest toast. |
hairline | bool | true | Timer hairline. |
close_button | bool | true | Close button on hover and focus. |
label | String | "Notifications" | Region name. |
seed | Vec<SeedToast> | Default::default() | Toasts shown on mount. |
children | Element | Default::default() | The app (calls `use_toasts()`). |
on_action | EventHandler<(u64, String)> | — | An action was pressed (toast id, label). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| F8 | Focus the newest toast and fan the stack out |
| Tab | Toast to toast, through action and close |
| Esc | Close the focused toast and move to the next |
Accessibility
- The stack is a labelled region ("Notifications (F8)"); every toast is focusable.
- New and updated toasts are announced politely, errors assertively.
- Timers pause while the pointer or focus is in the stack; swiping is never the only way out.
From the spec
One labelled region; every toast is focusable with its title as name. Statuses are announced politely, errors assertively. Timers pause while the pointer or focus is inside, so nothing disappears mid-read. Close and swipe are never the only way out: Escape works too.
Motion & interaction
New toasts slide 16 px in from their edge; the stack fans out on hover with a spring. The hairline runs down with the timer and pauses with it. Promise toasts morph: the icon pops into a check or cross that draws in, and the copy rises out of a blur. Swiped toasts follow the finger and fade.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Enter | 320 ms, 16 px | ease.out | 120 ms fade |
| Fan out / in | 360 ms | ease.out | instant |
| Exit | 200 ms | ease.out | instant |
| Icon morph | 300 ms pop + 260 ms draw | ease.out | swap |
| Timer | duration (4 s) | linear | same |
Responsive behaviour
- 356 px wide; under 600 px it spans the width with 12 px gutters.
Edge cases (spec)
Long copy wraps to two lines. More than visible toasts queue with paused timers. Under 600 px the stack spans the width. A toast resolved while hovered starts its timer when the pointer leaves.
Notes for AI
- Import
Toaster,use_toasts,SeedToastfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
ToasterElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.