useClipboard

Copy text to the clipboard with a temporary copied state, error handling and a fallback for insecure contexts.

ReactClipboardCopyBrowser API

Click the button to copy.

Install Dependencies

1npx shadcn@latest add https://ui.devsloka.in/r/use-clipboard.json