Copy Button
A button that copies text to the clipboard with visual feedback.
Loading...
import { CopyButton } from "@/components/ui/copy-button"
export function CopyButtonDemo() {Installation
pnpmnpmyarnbun
Usage
import { CopyButton } from "@/components/ui/copy-button"<CopyButton value="Text to copy" />Examples
With Text
Display next to a code snippet or command.
Loading...
import { CopyButton } from "@/components/ui/copy-button"
export function CopyButtonWithText() {Custom Content
Use custom text or icons inside the button.
Loading...
import { CopyButton } from "@/components/ui/copy-button"
export function CopyButtonCustom() {API Reference
CopyButton
Extends the Button component with copy functionality.
All other Button props are supported.