react copy input value in clipboard javascript code example
Example: react copy to clipboard button
<buttononClick={() => navigator.clipboard.writeText("Copy this text to clipboard")}>
Copy
</button>
<buttononClick={() => navigator.clipboard.writeText("Copy this text to clipboard")}>
Copy
</button>