Radio card
Selectable card options in a vertical radio group with optional badges and trailing content.
Properties
| Property | Attribute | Description | Type name | Type | Default |
|---|---|---|---|---|---|
name | name | Optional shared name for form submission via the hidden input. | string | string | "" |
value | value | Currently selected card value. | string | string | "" |
ariaLabel | aria-label | Accessible name when the group is not labelled by a visible heading. | string | string | "" |
ariaLabelledBy | aria-labelledby | ID of the element that labels the group. | string | string | "" |
Slots
| Name | Description |
|---|---|
default | `duo-radio-card` elements. |
Usage
Radio card pairs a native radio input with a rich card layout. Wrap options in duo-radio-card-group and give each duo-radio-card the same name and a unique value.
<duo-radio-card-group aria-labelledby="packages-heading"> <duo-radio-card name="package" value="basic" title="Basic" subtitle="Checkado" checked > <duo-badge slot="badges" variant="secondary" label="ID check"></duo-badge> <div slot="trailing"> <duo-price amount="990" currency="SEK"></duo-price> </div> </duo-radio-card></duo-radio-card-group>Do
- Label the group with
aria-labelledbywhen a visible heading is present, otherwisearia-label. - Use the
badgesslot for compact included-item labels withduo-badge. - Use the
trailingslot for price, status, or any right-aligned content. - Listen for the
changeevent onduo-radio-card-groupwhen the selected value changes. - Use arrow keys to move between options once focus is inside the group.
Don’t
- Don’t use for multi-select — use checkboxes instead.
- Don’t use
duo-chipfor static labels — chips are for combobox selections and dismissible tags. - Don’t use for navigable rows without selection — use List group item.
- Don’t omit
name— cards in the same group must share it for native radio behaviour.
Slots
| Component | Slot | Purpose |
|---|---|---|
duo-radio-card | title | Primary label (overrides title) |
duo-radio-card | subtitle | Secondary line (overrides subtitle) |
duo-radio-card | badges | Included-item labels (e.g. duo-badge) |
duo-radio-card | trailing | Trailing content such as price or status |
Events
| Event | Detail | Description |
|---|---|---|
change | { value: string } | Fired on duo-radio-card-group when the selected value changes |
Related
duo-radio-card-group— vertical stack withrole="radiogroup".duo-badge— compact status or count labels.duo-price— formatted monetary amounts for the trailing slot.duo-section— grouped wrapper for package pickers (usevariant="raised"for a tinted surface).