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)