#005
States
Disabled buttons, a destructive action with an icon, and a link rendered as a button.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "States" pattern (@codeatlasdev/ui demo #005, inputs/button) in my app.
Call get_demo({ ids: ["#005"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Showing non-interactive and dangerous actions, or navigating with button styling via `href`.
Keep these library parts, with the props and tokens the demo uses:
- Button from "@codeatlasdev/ui"
Behaviour to keep:
- `disabled` on `variant="filled"`, `variant="outlined"` and `variant="glass"`
- `variant="destructive"` with a `Trash2` icon in `{#snippet leading()}` (`size={15}`)
- `href="https://github.com/codeatlasdev/ui"` with `target="_blank"` renders an anchor
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
- Button
@codeatlasdev/ui
How it is built
- `disabled` on `variant="filled"`, `variant="outlined"` and `variant="glass"`
- `variant="destructive"` with a `Trash2` icon in `{#snippet leading()}` (`size={15}`)
- `href="https://github.com/codeatlasdev/ui"` with `target="_blank"` renders an anchor
Related
Loading source.