+
+ Selection · Radio cards
+ Radio cards
+
+ Card-style single-select built ON TOP of RadioGroup — it reuses RadioGroup's
+ soma wholesale (selection, roving focus, native <form> integration,
+ role=radio) and adds only the card chrome: icon · title · description and an
+ always-present corner radio. Vertical, horizontal and grid layouts.
+
+
+
parts{compiled.parts.order.length}
+
somareused
+
colors4
+
apgradio ↗
+
+
+
+
+
+
+ {#each plans as p (p.value)}
+
+ {#if withIcon}{@render icon(p.icon)}{/if}
+
+ {p.title}
+ {#if withDescription}{p.desc}{/if}
+
+
+ {/each}
+
+
+
+ trace
+ {#if trace.length === 0}
+ select a card to see commit events
+ {:else}
+ {#each trace.slice(0, 3) as entry}
+ {entry.event} · {entry.family}{entry.intent ? ' · ' + entry.intent : ''}
+ {fmtTime(entry.at)}
+ {/each}
+ {/if}
+
+ value {value || '∅'}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#if tab === 'live'}
+
+ Controls
+ Props grouped by layer: soma behavior + form (reused from RadioGroup), eidos card visual.
+
+ soma props · reused from RadioGroup
+
+
+
+
+
+
+
+
+
+ eidos props · card visual
+
+
+
+
+
+
+
+
+
+
+ eidos
+ card visual over RadioGroup's reused soma
+ svelte
+
+
{eidosSnippet}
+
+
+ {/if}
+
+ {#if tab === 'examples'}
+
+ Examples
+ Common radio-card patterns — vertical with description, horizontal, grid, payment method.
+
+ Horizontal — billing period
+
+
+
+ Monthly
+ $12 / month, billed monthly.
+
+
+
+
+ Annual · save 17%
+ $120 / year, billed annually.
+
+
+
+
+ Grid — 2 columns
+
+ {#each [['comfortable', 'Comfortable', 'Roomy spacing for everyday use.'], ['compact', 'Compact', 'Denser layout that fits more.'], ['cozy', 'Cozy', 'A balanced middle ground.'], ['spacious', 'Spacious', 'Maximum breathing room.']] as [v, t, d] (v)}
+
+
+ {t}
+ {d}
+
+
+ {/each}
+
+
+ Payment method — with icon, color affirm
+
+
+ {@render icon('bolt')}
+
+ Card ending 4242
+ Visa · expires 09/27
+
+
+
+ {@render icon('sparkle')}
+
+ PayPal
+ Connected account.
+
+
+
+
+ {/if}
+
+ {#if tab === 'api'}
+
+ API reference
+
+
+ | Prop | Type | Default | Description |
+
+ | value bindable | string | '' | Selected value (reused from RadioGroup). |
+ | disabled / readonly / required / invalid | boolean | false | Field-integration flags. |
+ | orientation | 'vertical'|'horizontal' | 'vertical' | Stack vs wrapping row. |
+ | name | string | — | Form field name (auto-renders HiddenInput per card). |
+ | size eidos | ResponsiveProp<'xs'…'xl'> | 'md' | Padding · title/desc font · circle size. |
+ | color eidos | 'primary'|'secondary'|'neutral'|'affirm' | 'primary' | Selected border + tint. |
+ | columns eidos | number | — | CSS grid columns. |
+
+
+
+
+ {/if}
+
+ {#if tab === 'morfo'}
+
+ morfo · declarative contract
+ Source: src/uix/morfo/components/radio-cards.ts. scope:['eidos'] — only the card-presentation parts. The interactive contract (Provider/Item, role=radio, keyboard, commit-select) belongs to RadioGroup and is reused via its soma.
+
+
+ | Part | Marker | Element | Archetype | Optional |
+
+ {#each partsList as part}
+
+ | {part.kebab} |
+ [{part.marker}] |
+ <{part.defaultElement}> |
+ {part.archetype ?? '—'} |
+ {part.optional ? 'yes' : 'no'} |
+
+ {/each}
+
+
+
+
+ {/if}
+
+ {#if tab === 'recipe'}
+
+ Eidos recipe
+ Selectors at src/uix/eidos/components/radio-cards/radio-cards.css. radio-group.css is not loaded here — only RadioGroup's foundation tokens; the card owns its visual, reusing --_radio-group-palette-*. Spacing is all --space-* (density-aware). Honours prefers-reduced-motion.
+
+
+ | Selector | Source |
+
+ | [data-radio-cards][data-orientation / data-columns] | eidos · layout |
+ | [data-radio-cards] [data-radio-cards-item] | eidos · card chrome |
+ | [data-radio-cards-item][data-state='checked'] | morfo state · reused |
+ | [data-radio-cards-indicator] + ::after | eidos · corner radio |
+ | [data-radio-cards-title / -description / -icon] | eidos · content |
+ | @media (prefers-reduced-motion: reduce) | eidos · a11y |
+
+
+
+
+ {/if}
+
+ {#if tab === 'a11y'}
+
+ Accessibility
+ APG radio pattern — inherited from RadioGroup. The whole card is the radio (role=radio); roving tabindex; auto-select on focus. Corner circle + icon are aria-hidden; the Title carries the accessible name.
+ Keyboard
+
+
+ | Key | Action |
+
+ | Tab | Focus enters / leaves group at the checked (or first enabled) card. |
+ | ↓ / → | Move focus + select next enabled card. |
+ | ↑ / ← | Move focus + select previous enabled card. |
+ | Space | Select focused card. |
+
+
+
+ ARIA contract
+
+
+ | Part | Attribute | Value |
+
+ | root | role / aria-orientation / aria-invalid | "radiogroup" / vary |
+ | card (item) | role / aria-checked / tabindex | "radio" / bool / 0|−1 |
+ | indicator / icon / hidden-input | aria-hidden | "true" |
+
+
+
+
+ {/if}
+