A copy button component with a variety of styles and animations.
Made by imskyleenInstallation
Usage
API Reference
CopyButton
| Prop | Type | Default | Description |
|---|---|---|---|
content | string | - | The content of the button. |
copied? | boolean | - | The copied state of the button. |
onCopiedChange? | (copied: boolean, content?: string) => void | - | The callback function when the copied state changes. |
delay? | number | 3000 | The delay in milliseconds before the copied state resets. |
variant? | "default" | "accent" | "destructive" | "outline" | "secondary" | "ghost" | "link" | default | The variant of the button. |
size? | "default" | "sm" | "lg" | "icon" | default | The size of the button. |
hoverScale? | number | 1.05 | The scale of the button on hover. |
tapScale? | number | 0.95 | The scale of the button on tap. |
...props? | HTMLMotionProps<"button"> | - | The props for the button. |
Credits
- Credit to shadcn/ui for style inspiration.
Built by Léo
Last updated: 5/14/2026