The simple example demonstrates how to style checkbox and radio button elements to look like on/off switches.
<div class="switch">
<input
class="switch__control"
type="checkbox"
name="example01"
id="example01">
<label class="switch__label" for="example01">
<span class="switch__content">Label content</span>
</label>
</div>