Skip to content

AlertPro

A persistent message that helps people recover or continue: tone icon, title and details; dismissing collapses its height; tone and copy changes morph in place.

oxyn add alert

Content below closes the gap when the alert is dismissed.

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 message that stays until it is dealt with: a failed deploy with Retry and logs, a context window nearly full, an archived workspace.
  • It sits in the flow of the page, not over it.

When not to use

  • Calm toasts from anywhere: use Toaster instead.
  • Notice cards stacked behind each other: use Notification Stack instead.
  • A small status label that carries the colour: use Badge instead.

Installation

Alert 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 alert

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

Agent error

Retry, logs and details.

Content below closes the gap when the alert is dismissed.

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

Success

A quiet confirmation.

Deployed to production
Run 248 shipped in 3 min 12 s. Health checks are green.

Content below closes the gap when the alert is dismissed.

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

Warning

Context almost full.

Context is 86 % full
The agent will compact older turns soon. Pin anything it must keep.

Content below closes the gap when the alert is dismissed.

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

Agent

The agent's identity colour.

Atlas is working in the background
It's refactoring auth/session.ts and will ask before pushing.

Content below closes the gap when the alert is dismissed.

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

Outline

Monochrome outline.

Read-only mode
This workspace is archived. Restore it to run agents again.

Content below closes the gap when the alert is dismissed.

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

Alert

PropTypeDefaultDescription
titlerequiredString—Headline.
toneString"info"`info` · `success` · `warning` · `danger` · `agent`.
bodyOption<String>Default::default()Details under the title.
openbooltrueShown (presence).
dismissibleboolDefault::default()Dismiss button.
actionsVec<String>Default::default()Action buttons.
detailsOption<String>Default::default()Collapsible technical details.
variantString"soft"`soft` · `outline` · `solid`.
on_dismissEventHandler<()>—Dismissed.
on_actionEventHandler<String>—Action pressed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceDismiss, actions and Show logs

Accessibility

  • Danger is role=alert; the rest role=status.
  • The dismiss button is named "Dismiss: <title>"; the icon is decorative.
From the spec

Danger is role=alert, the rest role=status, so tone changes are announced with the right urgency. The icon is decorative; the dismiss button reads "Dismiss: <title>". Colour is never the only signal: each tone has its own icon.

Motion & interaction

The icon pops in when the tone changes; the copy rises out of a 3 px blur when it changes. Dismissing collapses the height so content below closes the gap. Details open with a height transition.

Timing
TransitionDurationEasingReduced motion
Icon morph260 msease.outswap
Copy change220 msease.outswap
Collapse320 msease.outinstant
Details260 msease.outinstant

Responsive behaviour

  • Fills its container; the copy wraps, the icon and button keep their size.
Edge cases (spec)

Long titles wrap; details scroll inside 140 px. Changing tone while collapsing reopens with the new tone. Inside narrow panels the actions wrap below.

Notes for AI

  • Import Alert from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: AlertEl in oxyn_gpui.
  • Props to set first: title.
  • 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