Trial bannerPro
Tells a team how long their trial has left: a ring empties as days pass, the text says what they would lose, and paying is one press away; it comes as a thin strip, a side panel or a compact header badge that hiding or postponing shrinks it into.
oxyn add trial-bannerThe 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
- Keep a trial's end in view without nagging: days left, what is lost, and the upgrade one click away.
When not to use
- Replays a multi-agent run on one clock: use Agent timeline instead.
- One model at a glance: use Model card instead.
- A small automation on a single rail: use AI workflow instead.
Installation
Trial banner 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 trial-bannerUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Banner
Nine days left as a slim banner.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Warning card
Two days left as a sidebar card.
- Single sign-onOkta and Google Workspace
- Slack alerts3 channels
- Linear sync2-way issues
- GitHub checksOn every pull request
- 12 seatsFree keeps 3
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Expired
Expired.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Pill
The header pill; it opens the card (Oxyn extra).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
TrialBanner
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
variant | String | "banner" | `banner`, `card` or `pill`. |
days_left | i64 | 9 | Days remaining; zero or below means the trial is over. |
warn_at | i64 | 3 | The warning starts at this many days. |
fail | bool | Default::default() | Adding a card fails once (error scenario). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Plans, add a card, postpone, hide |
| EnterorSpace | Run an action, open the snooze menu or the pill's card |
| ↑or↓ · Enter · Escape | Move in, pick from or close the snooze menu |
Accessibility
- Strip and panel are named regions; the ring is decoration only, and the day count is always written.
- Near the end the wording switches to the actual weekday it stops; ended and paid states have their own sentences.
- Billing, snooze and dismiss results are announced, including when an action is simulated.
From the spec
Labelled regions; the ring is decorative; the snooze menu is a menu with arrow keys and Escape; results are announced, including simulated ones. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
The ring follows days left / trial length and takes the tone colour; copy swaps with a short rise; snooze and dismiss fold into the pill, which reopens the card.
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 |
|---|---|---|
| Add payment | 1100 ms | — |
| Copy swap | 160 ms | ease-out |
| Note | shown 4 s | — |
Reduced motion: loops and travel stop; each state shows its end pose and its words.
Responsive behaviour
- Under 600 px the buttons drop under the copy.
- The card fills its column up to 340 px.
Edge cases (spec)
Banner: under 600 px (container query) the buttons drop under the copy and the sub line may take two lines. Card: up to 340 px. The days are always in the text. 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 and model marks.
Notes for AI
- Import
TrialBannerfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AiKitViewinoxyn_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.