Copy

A button component for copying text to clipboard with visual feedback.

Usage

1
2
3
4
5
import { Copy } from "@/components/bank/copy"

export default function ShareableText() {
  return <Copy title="Text to copy" />
}

Props

title

The text to be copied to clipboard.

Type: string

Features

Visual Feedback

Icon changes to a checkmark when text is copied, providing clear user feedback.

Timeout Reset

Automatically resets to the copy icon after 2 seconds.

Clipboard Integration

Uses the native Clipboard API for reliable text copying.