Checkbox

Classes Information

ClassNameDescription
checkboxContainer element
checkbox-primaryPrimary color
checkbox-secondarySecondary color
checkbox-successSuccess color
checkbox-warningWarning color
checkbox-bordered-primaryWith primary border by default
checkbox-bordered-secondaryWith secondary border by default
checkbox-bordered-successWith success border by default
checkbox-bordered-warningWith warning border by default
checkbox-bordered-errorWith error border by default
checkbox-xsExtra small size
checkbox-smSmall size
checkbox-mdMedium size
checkbox-lgLarge size
checkbox-xlExtra large size

Basic Usage

Example Code

html
<div>
    <label class="flex cursor-pointer gap-2">
        <input type="checkbox" class="checkbox" />
        <span>Remember me?</span>
    </label>
</div>

Disable

Example Code

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

Colors

Example Code

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

Bordered

Example Code

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

Sizes

Example Code

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