🎉Paper UI v2.0 is here!
See what's new

PUCopyToClipboard Component

A hand-drawn style copy-to-clipboard component with success feedback and smooth animations

Usage

Basic Usage

Different Sizes

Custom Text

Disabled State

Props

PropTypeRequiredDefaultDescription
textstringNoCopyButton text
valuestringNo''Text to copy to clipboard
successTextstringNoCopied!Success message text
disabledbooleanNofalseDisabled state
sizesmall | medium | largeNomediumButton size
customClassstringNo''Custom CSS classes

Events

EventPayloadDescription
copystringEmitted when copy is initiated
successstringEmitted when copy is successful
errorErrorEmitted when copy fails

Features

  • Hand-drawn style button with organic shadows
  • Smooth success animation with icon change
  • Uses modern Clipboard API
  • Automatic reset after 2 seconds
  • Multiple sizes for different use cases
  • Disabled state support
  • Customizable text and success messages
  • Dark mode support
  • Responsive design

Dependencies

  • Tailwind CSS for styling
  • Vue 3 Composition API
  • Modern browser Clipboard API