Skip to Content

copy-button

ui

A button that copies text to the clipboard with visual feedback on success.

Use cases

  • Code snippet copying
  • Install command copying
  • URL sharing
  • API key copying

Features

  • Clipboard API with legacy fallback
  • Visual feedback (checkmark) on copy
  • Configurable copied-state duration
  • Icon-only mode for compact layouts
  • Multiple size and variant options

Preview

Interactive preview with light/dark mode toggle. Switch to Code tab to view the full source.

npx shadcn@latest add https://registry.mukoko.com/api/r/buttonCopy

Installation

npx shadcn@latest add https://registry.mukoko.com/api/v1/ui/copy-button

Dependencies

lucide-reactbutton

API

Fetch this component's metadata and source code from the registry API.

GET/api/v1/ui/copy-button

Source

components/ui/copy-button.tsx