UI Components
CopyButton
One-click clipboard copy button with animated success feedback.
Quick Preview
Installation
// Copy fromsrc/components/ui/CopyButton.tsx
Examples
Icon only
Variants
In a code block
npm install nextPrompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
text* | string | - | Text to copy to clipboard |
label | string | - | Button label text |
successLabel | string | 'Copied!' | Label shown after successful copy |
size | 'sm' | 'md' | 'lg' | 'md' | Button size |
variant | 'default' | 'ghost' | 'outline' | 'default' | Visual variant |
className | string | - | Additional CSS classes |