A selectable form element that represents a binary state (on or off).
HTML
<div class="toggle">
<input id="toggle-id-0" type="checkbox" aria-label="Toggle me!" />
<label for="toggle-id-0"></label>
</div>
In order to achieve disabled styles, you'll need to add the disabled
attribute to the inner input.
HTML
<div class="toggle">
<input id="toggle-id-1" type="checkbox" aria-label="Disabled toggle" disabled />
<label for="toggle-id-1"></label>
</div>
HTML
<div class="toggle">
<input id="toggle-id-2" type="checkbox" aria-label="Disabled toggle" checked disabled />
<label for="toggle-id-2"></label>
</div>