#051
Disabled
Two disabled switches, one off and one on.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Disabled" pattern (@codeatlasdev/ui demo #051, inputs/switch) in my app.
Call get_demo({ ids: ["#051"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Showing a setting that cannot be changed, for example a locked plan feature.
Keep these library parts, with the props and tokens the demo uses:
- Switch from "@codeatlasdev/ui"
Behaviour to keep:
- `<Switch disabled label="Disabled off" />`
- `<Switch checked disabled label="Disabled on" />`
- No bound state
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
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 disabled label="Disabled off" />`
- `<Switch checked disabled label="Disabled on" />`
- No bound state
Related
Loading source.