CopyButton
Actions

CopyButton.

One-click clipboard action with a toast.

Real interactive component
Live demo

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.

5 props
ParameterTypeRequiredDefaultPossible valuesDescription
valuestringYes——Text written to the clipboard.
childrenReactNodeNoCopy—Button label.
variant"primary" | "secondary" | "ghost" | "outline" | "danger"Nosecondaryprimary · secondary · ghost · outline · dangerInherited Button visual style.
size"sm" | "md" | "lg" | "icon"Nomdsm · md · lg · iconInherited Button dimensions.
disabledbooleanNofalsetrue · falsePrevent copying.