Skip to content
Back

Proactive cardPro

The assistant drops an offer into a feed when it notices something: accept runs the steps in place and resolves into a result with Review, Not now opens a snooze menu that folds the card into one line with Undo, and the cross removes it.

oxyn add proactive-card
Assistant · From your calendar

Fernpoint renews in 3 days

Your Team plan renews on Friday at $49 a month. You used 3 of 10 seats this quarter. Want me to compare plans and draft a downgrade?

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

  • Let an assistant offer help it noticed (a renewal, a deadline) inside the feed the person is already reading, without a modal.

When not to use

  • Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
  • The model menu of an AI chat: use Model Picker instead.
  • The prompt box for an agent, in six layouts: use Composer instead.

Installation

Proactive card 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 proactive-card

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

Offer

The offer between two posts.

Assistant · From your calendar

Fernpoint renews in 3 days

Your Team plan renews on Friday at $49 a month. You used 3 of 10 seats this quarter. Want me to compare plans and draft a downgrade?

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

Alone

The card on its own (Oxyn extra).

Assistant · From your calendar

Fernpoint renews in 3 days

Your Team plan renews on Friday at $49 a month. You used 3 of 10 seats this quarter. Want me to compare plans and draft a downgrade?

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

Step fails

The second step fails and offers Try again.

Assistant · From your calendar

Fernpoint renews in 3 days

Your Team plan renews on Friday at $49 a month. You used 3 of 10 seats this quarter. Want me to compare plans and draft a downgrade?

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

ProactiveCard

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
failboolDefault::default()The second step fails (error scenario with Try again).
in_feedbooltrueShow the card between two feed posts.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑ ↓ · HomeorEndMove in the snooze menu
EnterPick a snooze time
EscapeClose the snooze menu

Accessibility

  • The card is an article named by its title; the steps list is marked busy while it runs.
  • Every outcome (snoozed, removed, failed, done) is announced and can be undone where it makes sense.
From the spec

The card is an article named by its title; the step list is aria-busy while working; the snooze menu uses arrows, Enter and Escape; every outcome is announced. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Steps appear one by one with a shimmer on the running one and a check when done; the result swaps in place; snoozing folds the card into a dashed one-line row.

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
Step1100 ms each (STEP_MS)—
Card in180 msease-out

Reduced motion: CSS motion is cut to a frame; decorative bands and rings are hidden or still; state and text changes stay.

Responsive behaviour

  • Actions wrap; feed posts wrap their text.
Edge cases (spec)

Feed posts and the card wrap their text; actions wrap. The source mark (Google Calendar) is the official coloured mark. 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 marks.

Notes for AI

  • Import ProactiveCard from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: XPostView 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