useClipboard
useClipboard
is a custom hook to handle copying content to clipboard.
Return value#
The useClipboard
hook returns an object with the following fields:
Name | Type | Default | Description |
---|---|---|---|
value | string | The copied value. | |
onCopy | function | Callback function to copy content. | |
hasCopied | boolean | false | If true , the content has been copied . |
Import#
Usage#
Paste here
Editable Example