#037
Vertical
Default vertical radio group of three fruits with the selected value printed below.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Vertical" pattern (@codeatlasdev/ui demo #037, inputs/radio) in my app.
Call get_demo({ ids: ["#037"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Single choice from a short list in a form or settings panel.
Keep these library parts, with the props and tokens the demo uses:
- RadioGroup from "@codeatlasdev/ui"
Behaviour to keep:
- `<RadioGroup items={fruits}` with `bind:value={fruit}` and no orientation prop
- `fruits` has 3 items: Apple, Banana, Cherry
- Initial value is `$state('apple')`
- Selected value is shown in `<code>{fruit}</code>` under the group
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 items={fruits}` with `bind:value={fruit}` and no orientation prop
- `fruits` has 3 items: Apple, Banana, Cherry
- Initial value is `$state('apple')`
- Selected value is shown in `<code>{fruit}</code>` under the group
Related
Loading source.