JSFiddle - React, Tailwind, and code Playground
HTML
<input id="E" value="C">
JavaScript
e=document.getElementById("E");function c(){e.select();document.execCommand('copy');}e.addEventListener("click", c)
<input id="E" value="C">
e=document.getElementById("E");function c(){e.select();document.execCommand('copy');}e.addEventListener("click", c)