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-cardsThe 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
- 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.
oxyn add radio-cardsUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Plans
Plans with prices; one card disabled with a reason.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
List
Stacked rows with meta at the end.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Permissions
Permission modes with risk tones (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
RadioCards
| Prop | Type | Default | Description |
|---|---|---|---|
optionsrequired | Vec<RadioCard> | — | Cards. |
value | Option<String> | Default::default() | Selected. |
layout | String | "grid" | `grid` · `list`. |
min_column | f32 | 180.0 | Narrowest grid column px. |
label | String | "Options" | Group label. |
name | Option<String> | Default::default() | Form name. |
disabled | bool | Default::default() | Disabled. |
on_change | EventHandler<String> | — | Selected. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | One tab stop |
| Arrows | Select the next enabled card, wrapping |
| HomeorEnd | First / last enabled |
| EnterorSpace | Select |
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
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Ring glide | 260 ms | ease.out | jump |
| Dot pop | 220 ms | overshoot | instant |
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
RadioCardsfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
RadioCardsElinoxyn_gpui. - Props to set first:
options. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.