JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<p>Select your preferred contact method:</p>
<div>
  <input type="checkbox" id="email" name="contact">
  <label for="email">Email</label>
</div>

<div>
  <input type="checkbox" id="phone" name="contact">
  <label for="phone">Phone</label>
</div>

CSS

input[type="checkbox"]:checked + label {
  font-weight: bold;
}