Skip to main content
Version: 2.0.0-alpha

Interface: UseClipboardProps

Properties

copiedDuration

Optional copiedDuration: number

revert back the isCopied flag to false again if a value is set.

Defined in

lib/src/hooks/useClipboard.tsx:38


disableClipboardAPI

Optional disableClipboardAPI: boolean

Disables the new clipboard API navigator.clipboard even if it is supported.

Defined in

lib/src/hooks/useClipboard.tsx:33

Methods

onError

Optional onError(error): void

Triggers when the hook encounters an error. If passed hook won't throw an error.

Parameters

NameType
errorstring

Returns

void

Defined in

lib/src/hooks/useClipboard.tsx:27


onSuccess

Optional onSuccess(text): void

It's callback function that is called after the copy command is executed.

Parameters

NameType
textstring

Returns

void

Defined in

lib/src/hooks/useClipboard.tsx:19