Dev Design Library

Copy Button

A copy-to-clipboard button that shows a 2-second Copied confirmation, disables itself when there is nothing to copy, and treats an unavailable clipboard (insecure context or denied permission) as a silent no-op. Fully controlled via value;.

Copy Button preview
Library
LocalMode
Framework
React
Type
component
License
MIT
Dependencies
lucide-react
Install
npx shadcn add @localmode/ui/ui/input-controls/copy-button
Files
  • apps/ui/registry/localmode/input-controls/copy-button/copy-button.tsx
  • apps/ui/registry/localmode/lib/utils.ts
Source
https://github.com/LocalMode-AI/LocalMode

Categories

More from LocalMode