useClipboard

Copy string to clipboard.

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

General

Preview
See code

APIs

useClipboard

type UseClipboardOptions = {
  onError: Function
}

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

const useClipboard = (options?: UseClipboardOptions) => CopyResult
Edit this page on GitHub

Previous

useClickAway

Next

useCurrentState

MADE & DESIGNED WITHBY BRUNO ANDRADE
docs background gradient blue
docs background gradient violet