#034
Cards
Radio group in `cards` variant with three plans, one disabled, bound to a selected plan.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Cards" pattern (@codeatlasdev/ui demo #034, inputs/radio) in my app.
Call get_demo({ ids: ["#034"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Choosing a subscription plan or any option that needs a title and a short description.
Keep these library parts, with the props and tokens the demo uses:
- RadioGroup from "@codeatlasdev/ui"
Behaviour to keep:
- `<RadioGroup variant="cards"` with `aria-label="Plan"`
- `items={plans}` holds 3 entries with `value`, `label`, `description`: Free, Pro, Team
- Team entry has `disabled: true`
- `bind:value={plan}` with initial `$state('pro')`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- RadioGroup
@codeatlasdev/ui
How it is built
- `<RadioGroup variant="cards"` with `aria-label="Plan"`
- `items={plans}` holds 3 entries with `value`, `label`, `description`: Free, Pro, Team
- Team entry has `disabled: true`
- `bind:value={plan}` with initial `$state('pro')`
Related
Loading source.