Utils
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 | Function to copy content. | |
hasCopied | boolean | false | If true, the content has been copied to clipboard . |
Import
import { useClipboard } from '@outfitio/outkit';