Tactile Copy Button
Tactile Copy Button: Copies text to the clipboard and cross-fades the copy icon into a check with a Copied label. Monospace value, resets on its own. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Tactile Copy Button
npx motion-ui-skill add craft-copy-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxlucide-reactreacttailwind-merge
Source files
Tactile Copy Button
Copies text to the clipboard and cross-fades the copy icon into a check with a Copied label. Monospace value, resets on its own.
Install
npx motion-ui-skill add craft-copy-button
Dependencies
clsxlucide-reactreacttailwind-merge
Usage
"use client";
import { CopyButton } from "@/components/buttons/copy-button";
export function CopyButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<CopyButton />
</div>
);
}
API Reference
CopyButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
className |
string |
— | No | Additional CSS classes |