Components/useClipboard

useClipboard

Copy text to the clipboard with a timed success state.

Installation

Usage

API Reference

PropTypeDefaultDescription
hasCopiedboolean—True for timeout ms after a successful copy.
copy(text: string) => void—Copy text to clipboard.
reset() => void—Reset hasCopied to false.