#036
Horizontal
Radio group laid out in a row with Small, Medium and Large options.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Horizontal" pattern (@codeatlasdev/ui demo #036, inputs/radio) in my app.
Call get_demo({ ids: ["#036"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Short choice lists of 2 to 4 options, such as a size picker, where a row fits the layout.
Keep these library parts, with the props and tokens the demo uses:
- RadioGroup from "@codeatlasdev/ui"
Behaviour to keep:
- `<RadioGroup items={sizes}` with `orientation="horizontal"`
- `sizes` has 3 items: `value: 'sm'`, `value: 'md'`, `value: 'lg'` labelled Small, Medium, Large
- `bind:value={size}` with initial `$state('md')`
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={sizes}` with `orientation="horizontal"`
- `sizes` has 3 items: `value: 'sm'`, `value: 'md'`, `value: 'lg'` labelled Small, Medium, Large
- `bind:value={size}` with initial `$state('md')`
Related
Loading source.