Components › Actions
Copy button
Copies a value and confirms with a check for a moment.
Installation
npx plankui@latest add copy-buttonUsage
import { CopyButton } from "@/components/ui/copy-button";
<CopyButton value={apiKey} />
<CopyButton value={link} label="Copy link" />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | required | Text to copy. |
| label | string | Text beside the icon; icon-only when omitted. | |
| onCopied | () => void | Called after copying. |