Reusables

Copy Button

A button component to copy text to clipboard

Installation

npx shadcn@latest add "https://reusables.vercel.app/r/copy-button"

Usage

import { CopyButton } from "@/components/ui/copy-button"
const Example = () => {
  return (
    <div>
      <CopyButton value="Text to copy" />
    </div>
  )
}

Example

Reference

PropTypeDefault
value
string
-
className
string
-
variant
default | outline | ghost
ghost
Edit on GitHub

Last updated on

On this page