useClipboard
useClipboard
is a custom hook that handles 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#
import { useClipboard } from "@chakra-ui/react"
Usage#
Paste here
Editable Example