#014
Variants and sizes
CopyButton in three variants and two extra sizes, side by side.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Variants and sizes" pattern (@codeatlasdev/ui demo #014, inputs/copy-button) in my app.
Call get_demo({ ids: ["#014"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Choosing the emphasis and size of a copy action to match the surrounding UI.
Keep these library parts, with the props and tokens the demo uses:
- CopyButton from "@codeatlasdev/ui"
Behaviour to keep:
- `variant="filled"` with `value="filled"`
- `variant="glass"` with `value="glass"`
- `variant="outlined"` with `value="outlined"`
- `size="sm"` with `value="small"`
- `size="lg"` with `value="large"`
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
- CopyButton
@codeatlasdev/ui
How it is built
- `variant="filled"` with `value="filled"`
- `variant="glass"` with `value="glass"`
- `variant="outlined"` with `value="outlined"`
- `size="sm"` with `value="small"`
- `size="lg"` with `value="large"`
Related
Loading source.