useClipboard
Copy and paste text using the clipboard with a copied state.
Type Definitions
const useClipboard: (args?: {
duration?: number;
}) => {
isCopied: boolean;
copy: (data?: string | ClipboardItem | ClipboardItem[] | null) => Promise<void>;
paste: () => Promise<string>;
pasteData: (type: string) => Promise<ClipboardItems>;
reset: () => void;
};