TwitterGitHub
Dark LogoStratik / UIbeta
useClipboard

The useClipboard hook makes it easy to use clipboard with its two functions - copy and read.

Functions Table
NameParametersDescription
copytext: string, callback?: () => voidCopies the provided text to the clipboard and optionally executes a callback on success.
read-Reads and returns the current text from the clipboard.
Copy parameters
NameTypeDefaultDescription
textstring-The text to be copied to the clipboard.
callback() => void-Optional function to execute after successfully copying the text.

Copied Value

Mouse pointer click icon
First Press Copy or copy anything you want and then press the read button.

Hello, World!