JSFiddle - React, Tailwind, and code Playground
HTML
<button id="rotate" onclick= "rotate(document.getElementById('textboxid').value)">Rotate</button>
<input type="text" id="textboxid" />
<script>
function rotate(angle) {
alert('I will rotate in '+angle);
}
</script>