Radio
Radios pick one option from a group. Put radio on <input type="radio"> and share a name within the group.
Class names
| Class name | Type | Description |
|---|---|---|
radio | Component | Radio input (primary color by default) |
radio-primary | Color | Primary color |
radio-secondary | Color | Secondary color |
radio-success | Color | Success color |
radio-warning | Color | Warning color |
radio-info | Color | Info color |
radio-danger | Color | Danger color |
radio-sm | Size | Small |
radio-lg | Size | Large |
checked | State | Native attribute; fills the dot |
disabled | State | Native attribute; dims and blocks interaction |
Radio
<input class="radio" type="radio" name="radio-ex1" aria-label="Option">Group
<fieldset class="fieldset">
<legend class="fieldset-legend">Plan</legend>
<label class="label-inline"><input class="radio" type="radio" name="radio-ex2" value="free" checked> Free</label>
<label class="label-inline"><input class="radio" type="radio" name="radio-ex2" value="pro"> Pro</label>
<label class="label-inline"><input class="radio" type="radio" name="radio-ex2" value="team"> Team</label>
</fieldset>Colors
Each radio has its own group name so all can show as checked.
<input class="radio radio-primary" type="radio" name="radio-ex3a" aria-label="Primary" checked>
<input class="radio radio-secondary" type="radio" name="radio-ex3b" aria-label="Secondary" checked>
<input class="radio radio-success" type="radio" name="radio-ex3c" aria-label="Success" checked>
<input class="radio radio-warning" type="radio" name="radio-ex3d" aria-label="Warning" checked>
<input class="radio radio-info" type="radio" name="radio-ex3e" aria-label="Info" checked>
<input class="radio radio-danger" type="radio" name="radio-ex3f" aria-label="Danger" checked>Sizes
Medium is the default; there is no radio-md class.
<input class="radio radio-sm" type="radio" name="radio-ex4a" aria-label="Small" checked>
<input class="radio" type="radio" name="radio-ex4b" aria-label="Medium" checked>
<input class="radio radio-lg" type="radio" name="radio-ex4c" aria-label="Large" checked>Disabled
<label class="label-inline"><input class="radio" type="radio" name="radio-ex5a" disabled> Disabled</label>
<label class="label-inline"><input class="radio" type="radio" name="radio-ex5b" checked disabled> Disabled, checked</label>