Use clipboard

Copy string to clipboard.

This is custom React Hooks, you need to follow the Basic Rules when you use it.

Default

APIs

useClipboard

type UseClipboardOptions = {
  onError: () => void
}

type CopyResult = {
  copy: (text: string) => void
}

const useClickAway = (options?: UseClipboardOptions) => CopyResult