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-cardFernpoint 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 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
- 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.
oxyn add proactive-cardUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Offer
The offer between two posts.
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 preview is free. Pro opens the code of every Pro component, screen and template.
Alone
The card on its own (Oxyn extra).
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 preview is free. Pro opens the code of every Pro component, screen and template.
Step fails
The second step fails and offers Try again.
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 preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ProactiveCard
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
fail | bool | Default::default() | The second step fails (error scenario with Try again). |
in_feed | bool | true | Show the card between two feed posts. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ↑ ↓ · HomeorEnd | Move in the snooze menu |
| Enter | Pick a snooze time |
| Escape | Close 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.
| Transition | Duration | Easing |
|---|---|---|
| Step | 1100 ms each (STEP_MS) | — |
| Card in | 180 ms | ease-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
ProactiveCardfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
XPostViewinoxyn_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.