Installation
Usage
import ButtonCopy from "@/components/ruixen/button-copy";
export default function MyComponent() {
return (
<div className="flex gap-4">
<ButtonCopy value="npm install ruixen-ui" />
<ButtonCopy value="Copy this text" variant="outline" />
</div>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Text to copy |
variant | "default" | "outline" | "ghost" | "default" | Button style variant |
size | "sm" | "md" | "lg" | "md" | Button size |
className | string | - | Additional CSS classes |
Features
- One-click copy to clipboard
- Visual feedback with checkmark icon
- Automatic reset after copy
- Uses modern Clipboard API
- Light and dark mode support

