Skip to main content
Version: 2.0.0-alpha

Interface: useClipboardReturnType

Properties​

clipboard​

• clipboard: string

Current selected clipboard content.

Defined in​

lib/src/hooks/useClipboard.tsx:65


isCoppied​

• isCoppied: boolean

Indicates wheater the content was successfully copied or not.

Defined in​

lib/src/hooks/useClipboard.tsx:60


ref​

• ref: MutableRefObject<any>

Use ref to pull the text content from.

Defined in​

lib/src/hooks/useClipboard.tsx:45

Methods​

clearClipboard​

â–¸ clearClipboard(): void

Clears the user clipboard.

Returns​

void

Defined in​

lib/src/hooks/useClipboard.tsx:70


copy​

â–¸ copy(text?): void

Use it to perform the copy operation

Parameters​

NameType
text?string

Returns​

void

Defined in​

lib/src/hooks/useClipboard.tsx:50


cut​

â–¸ cut(): void

Use it to perform the cut operation

Returns​

void

Defined in​

lib/src/hooks/useClipboard.tsx:55


isSupported​

â–¸ isSupported(): boolean

Check to see if the browser supports the new navigator.clipboard API.

Returns​

boolean

Defined in​

lib/src/hooks/useClipboard.tsx:75