Skip to content
Back

Secret cardPro

A key the agent can use but never sees: masked to its last four characters, the chat only gets a handle, Show needs a confirm and hides itself after five seconds, Rotate swaps it with a progress bar and Revoke pauses the routines that used it, with Undo.

oxyn add secret-card

I'll issue the refund with {{secrets.STRIPE_SECRET_KEY}}. The key itself never enters this chat.

STRIPE_SECRET_KEYStripe · live modeActive
sk_live_••••••••••••4f2a
Read chargesCreate refundsRead customers
  • Refund routine6 min ago
  • Weekly revenue report1d ago
Stays out of the chat · the agent gets a handle
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 agent use an API key without the key ever entering the conversation: the chat gets a handle, the person keeps control of showing, rotating and revoking it.

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

Secret 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 secret-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

Active

An active key with its scopes and routines.

I'll issue the refund with {{secrets.STRIPE_SECRET_KEY}}. The key itself never enters this chat.

STRIPE_SECRET_KEYStripe · live modeActive
sk_live_••••••••••••4f2a
Read chargesCreate refundsRead customers
  • Refund routine6 min ago
  • Weekly revenue report1d ago
Stays out of the chat · the agent gets a handle
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

Compact

Key row and actions only (Oxyn extra).

STRIPE_SECRET_KEYStripe · live modeActive
sk_live_••••••••••••4f2a
Stays out of the chat · the agent gets a handle
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

Revoked

Revoked, routines paused, with Restore.

I'll issue the refund with {{secrets.STRIPE_SECRET_KEY}}. The key itself never enters this chat.

STRIPE_SECRET_KEYStripe · live modeRevoked
sk_live_••••••••••••4f2a
Read chargesCreate refundsRead customers
  • Refund routinePaused
  • Weekly revenue reportPaused
Revoked · 2 routines paused
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

SecretCard

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
revokedboolDefault::default()Start revoked.
show_chatbooltrueShow the chat line where the agent refers to the key by handle.
compactboolDefault::default()Hide scopes and routines.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterConfirm the pending action
EscapeCancel a confirm, or hide the shown key

Accessibility

  • The masked value is labelled as hidden except its last four characters.
  • Every confirm is an alert dialog with its consequence spelled out.
  • State changes (shown, rotating, revoked, restored) are announced.
From the spec

The masked value is labelled as hidden except its last four characters; confirms are alert dialogs that say the consequence; Enter confirms, Escape cancels or hides. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

The masked value keeps its last four characters; a shown key gets an amber outline and a countdown in the status line; rotation swaps the tail when the bar fills; revoking turns the routine dots amber with Paused.

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
Reveal5000 ms (REVEAL_MS)—
Rotate1600 ms (ROTATE_MS)linear
Undo window5000 ms (UNDO_MS)—

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 under the status line; the key value truncates inside its box.
Edge cases (spec)

The value truncates inside its own box; actions wrap under the status line; the Stripe mark sits on a white tile in both themes. 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 SecretCard 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