Chánh Đại

Copy Button

Buttons 13

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

    669
  • Theme Switcher

    Theme Switcher

    327
  • Hero Golden Spiral

    Hero Golden Spiral

    119
  • Mobius Loop Icon

    Mobius Loop Icon

    84
  • Wheel Picker

    Wheel Picker

    74
  • Glow Card Grid

    Glow Card Grid

    44
  • Testimonial 2

    Testimonial 2

    44
  • Spinning Circular Text

    Spinning Circular Text

    26

More in Buttons

View all
  • Button Group

    Button Group

    4
  • Button

    Button

    19
  • Texture Button

    Texture Button

    111
  • Button

    Button

    141
  • Button Group

    Button Group

  • Button

    Button

    4
  • Eclipse Button

    Eclipse Button

    45
  • Astryx Chat Send Button

    Astryx Chat Send Button

    4

Explore more

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