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-button

Components install as source into your project. The interactive page also includes preview, code, documentation and install tabs.

Dependencies

  • clsx
  • lucide-react
  • react
  • tailwind-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

  • clsx
  • lucide-react
  • react
  • tailwind-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

Browse this category