Menu

Toggle

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

Props

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