Menu

Toggle - Toggled on

<label for="id" class="c-toggle">
<input type="checkbox" class="c-toggle__checkbox" id="id" value="" role="switch" aria-checked="false" aria-label="Label" checked />
<span class="c-toggle__slider"></span>
<span class="c-toggle__label">Label</span>
</label>
{
"label": "Label",
"name": "name",
"id": "id",
"checked": true
}

Props

Name Type Description
label string
id string ID attribute
name string Name attribute (falls back to ID)
checked bool Is this input checked?