#006
Variants
All five button variants in a row: filled, glass, outlined, ghost and destructive.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Variants" pattern (@codeatlasdev/ui demo #006, inputs/button) in my app.
Call get_demo({ ids: ["#006"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Picking the emphasis of an action: filled for primary, outlined or ghost for secondary, destructive for irreversible.
Keep these library parts, with the props and tokens the demo uses:
- Button from "@codeatlasdev/ui"
Behaviour to keep:
- `variant="filled"` labelled Filled
- `variant="glass"` labelled Glass
- `variant="outlined"` labelled Outlined
- `variant="ghost"` labelled Ghost
- `variant="destructive"` labelled Destructive
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
- `variant="filled"` labelled Filled
- `variant="glass"` labelled Glass
- `variant="outlined"` labelled Outlined
- `variant="ghost"` labelled Ghost
- `variant="destructive"` labelled Destructive
Related
Loading source.