Skip to content
Back

Radio cardsPro

Option cards that need more than a label: one ring glides to the selected card, price and description slots, radio keyboard behaviour.

oxyn add radio-cards
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

  • Choices that need a description or price: plans, permission modes, models.

When not to use

  • How much the agent may do without asking: use Permission selector instead.
  • On or off for things that apply right away: use Switch instead.
  • A real checkbox with a label and second line, an indeterminate state for Select all, an error, a card row and a check that draws itself: use Checkbox instead.

Installation

Radio cards 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 radio-cards

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

Plans

Plans with prices; one card disabled with a reason.

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

List

Stacked rows with meta at the end.

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

Permissions

Permission modes with risk tones (Oxyn plus).

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

RadioCards

PropTypeDefaultDescription
optionsrequiredVec<RadioCard>—Cards.
valueOption<String>Default::default()Selected.
layoutString"grid"`grid` · `list`.
min_columnf32180.0Narrowest grid column px.
labelString"Options"Group label.
nameOption<String>Default::default()Form name.
disabledboolDefault::default()Disabled.
on_changeEventHandler<String>—Selected.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabOne tab stop
ArrowsSelect the next enabled card, wrapping
HomeorEndFirst / last enabled
EnterorSpaceSelect

Accessibility

  • radiogroup / radio with aria-checked and aria-disabled; described by description or the disabled reason.
  • Selection shows a ring and a filled dot, not colour alone.
From the spec

radiogroup with one tab stop; each card labelled by its label and described by its description (or the disabled reason); selection shown by ring and dot, not colour.

Motion & interaction

One ring glides to the selected card’s box and size; the dot pops in on a snappy spring.

Timing
TransitionDurationEasingReduced motion
Ring glide260 msease.outjump
Dot pop220 msovershootinstant

Responsive behaviour

  • auto-fill columns down to one in narrow containers.
Edge cases (spec)

Grid drops to one column in narrow containers; descriptions wrap; nothing truncates.

Notes for AI

  • Import RadioCards from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: RadioCardsEl in oxyn_gpui.
  • Props to set first: options.
  • 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