Radio

Classes Information

ClassNameDescription
radioRadio base class
radio-primarySet primary color
radio-secondarySet secondary color
radio-successSet success color
radio-errorSet error color
radio-warningSet warning color
radio-solidSet low gray background and primary color
radio-solid-secondarySet low gray background and secondary color
radio-solid-successSet low gray background and success color
radio-solid-errorSet low gray background and error color
radio-solid-warningSet low gray background and warning color
radio-bordered-primaryWith primary border by default
radio-bordered-secondaryWith secondary border by default
radio-bordered-successWith success border by default
radio-bordered-errorWith error border by default
radio-bordered-warningWith warning border by default
radio-xsSet extra small size
radio-smSet small size
radio-mdSet medium size
radio-lgSet large size
radio-xlSet extra large size

Basic Usage

Example Code

html
<label class="flex cursor-pointer gap-2">

    <input type="radio" class="radio" />
    <span>Remember me?</span>

</label>

Sizes

Example Code

html
<input type="radio" class="radio radio-xs" checked />
<input type="radio" class="radio radio-sm" checked />
<input type="radio" class="radio radio-md" checked />
<input type="radio" class="radio radio-lg" checked />
<input type="radio" class="radio radio-xl" checked />

Colors

Example Code

html
<input type="radio" class="radio-primary radio" checked />
<input type="radio" class="radio-secondary radio" checked />
<input type="radio" class="radio-success radio" checked />
<input type="radio" class="radio-warning radio" checked />
<input type="radio" class="radio-error radio" checked />

Solid

Example Code

html
<input type="radio" class="radio-solid radio" />
<input type="radio" class="radio-solid-secondary radio" />
<input type="radio" class="radio-solid-success radio" />
<input type="radio" class="radio-solid-warning radio" />
<input type="radio" class="radio-solid-error radio" />

Bordered

Example Code

html
<input type="radio" class="radio radio-bordered-primary" />
<input type="radio" class="radio radio-bordered-secondary" />
<input type="radio" class="radio radio-bordered-success" />
<input type="radio" class="radio radio-bordered-warning" />
<input type="radio" class="radio radio-bordered-error" />

Group

Example Code

html
<div id="group1" class="flex flex-row gap-3">
    <input type="radio" class="radio" name="group1" />
    <input type="radio" class="radio" name="group1" />
    <input type="radio" class="radio" name="group1" />
</div>

Disabled

Example Code

html
<input type="radio" class="radio" disabled />
<input type="radio" class="radio" disabled checked />