Tailwind radios

Responsive radios built with Tailwind. Limits the user to one selection, from a list of preset options. The singular property of a radio button makes it distinct from a checkbox.


Basic

Radio Buttons
        
            
    <!-- Required form plugin -->
    <link
      href="https://cdn.jsdelivr.net/npm/@tailwindcss/custom-forms@0.2.1/dist/custom-forms.css"
      rel="stylesheet"
    />

    <div class="block">
      <span class="text-gray-700">Radio Buttons</span>
      <div class="mt-2">
        <div>
          <label class="inline-flex items-center">
            <input
              type="radio"
              class="form-radio"
              name="radio"
              value="1"
              checked
            />
            <span class="ml-2">Option 1</span>
          </label>
        </div>
        <div>
          <label class="inline-flex items-center">
            <input type="radio" class="form-radio" name="radio" value="2" />
            <span class="ml-2">Option 2</span>
          </label>
        </div>
        <div>
          <label class="inline-flex items-center">
            <input type="radio" class="form-radio" name="radio" value="3" />
            <span class="ml-2">Option 3</span>
          </label>
        </div>
      </div>
    </div>