Copy Button
Copy text to the clipboard with success feedback.
Import
tsx
import { CopyButton } from "@cooud-ui/ui";
bash
npx cooud-ui add copy-button
Examples
API Reference
Generated from the component's exported types.
CopyButtonProps
Extends Omit<ButtonProps, "value" | "children">
| Prop | Type | Default | Description |
|---|---|---|---|
value* | string | — | Text written to the clipboard when the button is pressed. |
timeout | number | 1500 | Milliseconds the "copied" state stays visible before reverting. Defaults to 1500. |
copyLabel | string | "Copy" | Accessible label shown to assistive tech in the idle state. Defaults to "Copy". |
copiedLabel | string | "Copied" | Accessible label announced after a successful copy. Defaults to "Copied". |