Skip to content
Back

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-banner
9 days left in your Pro trialAfter Nov 30, Halcyon loses SSO and 12 seats.
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

  • Keep a trial's end in view without nagging: days left, what is lost, and the upgrade one click away.

When not to use

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.

Terminal
oxyn add trial-banner

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

Banner

Nine days left as a slim banner.

9 days left in your Pro trialAfter Nov 30, Halcyon loses SSO and 12 seats.
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 card

Two days left as a sidebar card.

Your Pro trial ends MondayAdd a payment method by Nov 23 to keep SSO and 12 seats.
  • 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 code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Expired

Expired.

Your Pro trial has endedHalcyon is on Free now. Add a payment method to get SSO and 12 seats back.
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

Pill

The header pill; it opens the card (Oxyn extra).

Header
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

TrialBanner

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
variantString"banner"`banner`, `card` or `pill`.
days_lefti649Days remaining; zero or below means the trial is over.
warn_ati643The warning starts at this many days.
failboolDefault::default()Adding a card fails once (error scenario).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabPlans, add a card, postpone, hide
EnterorSpaceRun an action, open the snooze menu or the pill's card
↑or↓ · Enter · EscapeMove 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.

TransitionDurationEasing
Add payment1100 ms—
Copy swap160 msease-out
Noteshown 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 TrialBanner from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView 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