Ashish Sharma

Copy Button

Component

About

A button that copies a value to the clipboard and shows a short confirmation ticket of what was copied, with a manual-select fallback if the clipboard is blocked.

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

"use client";

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

export default function CopyButtonDemo() {
  return (
    <div className="flex min-h-[200px] w-full items-center justify-center bg-background p-10">
      <CopyButton value="npm install caliper-ui" label="Copy install command" />
    </div>
  );
}

Dependencies

More by Ashish Sharma

View all
  • Perspective Gallery

    Perspective Gallery

    149
  • Bento Features

    Bento Features

    27
  • Animated Sidebar

    Animated Sidebar

    25
  • Otp Input

    Otp Input

    25
  • Glow Ring

    Glow Ring

    20
  • Notification Stack

    Notification Stack

    11
  • Expandable Tabs

    Expandable Tabs

    11
  • Voice Orb

    Voice Orb

    8

Explore more

Part of Caliper UI — browse the full library on 21st.dev.