JSFiddle - React, Tailwind, and code Playground
by techiedelight
HTML
<!doctype html>
<html lang="en">
<body>
<form>
<p>Choose your preferred contact method:</p>
<div>
<input type="radio" id="email" name="contact" value="email">
<label for="email">Email</label>
<input type="radio" id="phone" name="contact" value="phone">
<label for="phone">Phone</label>
</div>
<div>
<button id="submit" type="submit">Submit</button>
</div>
</form>
</body>
</html>
CSS
button {
font-size: 14px;
margin: 15px;
padding: 0 15px;
}
JavaScript
document.getElementById('submit').onclick = function() {
this.disabled = true;
// ...
}