JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container">
<label for="name">Name:</label>
<input type="text" id="name">
</div>
<button id="submit">Get Value</button>
CSS
label {
font: 15px 'Exo 2', sans-serif;
}
input {
margin: 6px;
}
button {
margin-top: 10px;
padding: 3px;
font: 15px 'Exo 2', sans-serif;
}
JavaScript
$(document).ready(function() {
$('#submit').click(function() {
var value = $('#name').val();
alert(value);
})
});