Skip to main content

Interface: UseClipboardProps

Properties

copiedDuration

โ€ข Optional copiedDuration: number

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

Defined in

hooks/useClipboard.tsx:33


disableClipboardAPI

โ€ข Optional disableClipboardAPI: boolean

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

Defined in

hooks/useClipboard.tsx:28


onError

โ€ข Optional onError: (error: string) => void

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

param cause of the error

Type declaration

โ–ธ (error): void

Parameters
NameType
errorstring
Returns

void

Defined in

hooks/useClipboard.tsx:22


onSuccess

โ€ข Optional onSuccess: (text: string) => void

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

param The selected clipboard text.

Type declaration

โ–ธ (text): void

Parameters
NameType
textstring
Returns

void

Defined in

hooks/useClipboard.tsx:14