Chánh Đại

Copy Button

Buttons 16

About

A button that copies text to the clipboard on click, with an animated icon swap plus haptic and audio feedback confirming success or failure.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Copy Button to your project and fits it to your theme.

Code

How Copy Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { CopyButton } from "@/components/ui/copy-button";

export default function CopyButtonDemo() {
  return (
    <div className="flex items-center justify-center">
      <CopyButton text="Some text to copy" />
    </div>
  );
}

Dependencies

More by Chánh Đại

View all
  • Apple Hello Effect

    Apple Hello Effect

    691
  • Theme Switcher

    Theme Switcher

    362
  • Hero Golden Spiral

    Hero Golden Spiral

    121
  • Mobius Loop Icon

    Mobius Loop Icon

    89
  • Wheel Picker

    Wheel Picker

    78
  • Testimonial 2

    Testimonial 2

    50
  • Glow Card Grid

    Glow Card Grid

    48
  • Spinning Circular Text

    Spinning Circular Text

    26

More in Buttons

View all
  • Button

    Button

    166
  • Texture Button

    Texture Button

    121
  • Button

    Button

    21
  • Figma File Button

    Figma File Button

    39
  • Native Button

    Native Button

    12
  • Button

    Button

    88
  • HeroUI Button Group

    HeroUI Button Group

    11
  • Great UI Button

    Great UI Button

    19

Explore more

Part of Chánh Đại — browse the full library on 21st.dev.