Zusty CSS Logo
Zusty CSS Logo
Version 1.2.0 is out now. Check out Release Notes.

Checkbox

Checkbox with better UI.


Structure


<label class="zust-checkbox">
  <input type="checkbox">
  <span></span>
  <span>Buy Oranges</span>
</label>
<br>

<label class="zust-checkbox">
  <input type="checkbox">
  <span></span>
  <span>Call Dad</span>
</label>


Minimum Code

The minimum code required to make a checkbox is

<label class="zust-checkbox">
  <input type="checkbox">
  <span></span>
</label>


Label

You may have noticed, adding label is kinda easy.



<label class="zust-checkbox">
  <input type="checkbox">
  <span></span>
  <span>Label After</span>
</label>
<br>
<br>

<label class="zust-checkbox">
<span>Label Before</span>
  <input type="checkbox">
  <span></span>
</label>


Colors

It includes all theme colors.






<label class="zust-checkbox">
  <input type="checkbox">
  <span></span>
  <span>Default</span>
</label>
<br>

<label class="zust-checkbox zust-success">
  <input type="checkbox">
  <span></span>
  <span>Success</span>
</label>
<br>

<label class="zust-checkbox zust-warning">
  <input type="checkbox">
  <span></span>
  <span>Warning</span>
</label>
<br>

<label class="zust-checkbox zust-error">
  <input type="checkbox">
  <span></span>
  <span>Error</span>
</label>
<br>

<label class="zust-checkbox zust-link">
  <input type="checkbox">
  <span></span>
  <span>Link</span>
</label>
<br>


Disabled

You can make a checkbox disabled by adding attribute disabled to label and input.

<label class="zust-checkbox" disabled>
  <input type="checkbox" disabled>
  <span></span>
  <span>Disabled</span>
</label>


Checked

A checkbox can be checked by default. Add attribute checked to the input to achieve that.

<label class="zust-checkbox">
  <input type="checkbox" checked>
  <span></span>
  <span>Checked by Default</span>
</label>


Outlined

There is also outlined checkboxes. You may need them, just add class zust-outlined.

<label class="zust-checkbox zust-outlined">
  <input type="checkbox" checked>
  <span></span>
  <span>Outlined</span>
</label>


Circular

There is another style, circular style. To get this style add class zust-circle. You can even use it with outlined.

<label class="zust-checkbox zust-circle">
  <input type="checkbox" checked>
  <span></span>
  <span>Circular</span>
</label>

checkSuccessfully Copied

Get involved in improving Zusty CSS.

Report a BugFeature Request

Support us by

Starring it on GitHubJoining our Discord ServerSharing on Twitter

Rapid Search Inside of Docs

Zusty Pages are Now Available offline.
New or Updated content available.  Refreshing...

Choose Editor