CopyButton.
One-click clipboard action with a toast.
The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.
Props & API reference
Parameters available in the shared component, including value types, requirements and accepted options.
| Parameter | Type | Required | Default | Possible values | Description |
|---|---|---|---|---|---|
value | string | Yes | — | — | Text written to the clipboard. |
children | ReactNode | No | Copy | — | Button label. |
variant | "primary" | "secondary" | "ghost" | "outline" | "danger" | No | secondary | primary · secondary · ghost · outline · danger | Inherited Button visual style. |
size | "sm" | "md" | "lg" | "icon" | No | md | sm · md · lg · icon | Inherited Button dimensions. |
disabled | boolean | No | false | true · false | Prevent copying. |