Components/useClipboard

useClipboard

Copy text to the clipboard with a timed success state.

Installation

Usage

API Reference

PropTypeDefaultDescription
hasCopiedbooleanTrue for timeout ms after a successful copy.
copy(text: string) => voidCopy text to clipboard.
reset() => voidReset hasCopied to false.