#012
Default
A default CopyButton that copies an npm install command.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Default" pattern (@codeatlasdev/ui demo #012, inputs/copy-button) in my app.
Call get_demo({ ids: ["#012"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Next to install commands, tokens or IDs so users can copy them in one click.
Keep these library parts, with the props and tokens the demo uses:
- CopyButton from "@codeatlasdev/ui"
Behaviour to keep:
- `<CopyButton value="npm i @codeatlasdev/ui" />`
- Only the `value` prop is set, no other props
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
- `<CopyButton value="npm i @codeatlasdev/ui" />`
- Only the `value` prop is set, no other props
Related
Loading source.