#053
Without label
Two switches with no visible label, named only through aria-label.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Without label" pattern (@codeatlasdev/ui demo #053, inputs/switch) in my app.
Call get_demo({ ids: ["#053"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Compact toggles in table rows or cards where the context already names the setting.
Keep these library parts, with the props and tokens the demo uses:
- Switch from "@codeatlasdev/ui"
Behaviour to keep:
- `<Switch bind:checked={analytics} aria-label="Analytics" />` with `$state(false)`
- `<Switch checked aria-label="Always on" />` with no binding
- No `label` prop is passed
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
- Switch
@codeatlasdev/ui
How it is built
- `<Switch bind:checked={analytics} aria-label="Analytics" />` with `$state(false)`
- `<Switch checked aria-label="Always on" />` with no binding
- No `label` prop is passed
Related
Loading source.