navigator.clipboard .writeText("Text") .then(() => console.log("Copied to clipboard")) .catch((err) => console.log(err))