Toggle
This provides a toggle component
Required classes
Util-cssToggle, Util-cssToggleLabel, Toggle-expanded, Toggle-collapsed
Remarks
- The
idof.Util-cssTogglemust be uniq and match theforattribute of.Util-cssToggleLabel - CSS is not included, you might reference to the
.Contentstyle in the example given below
<input class="Util-cssToggle" type="checkbox" name="Promotion-tags-toggle" id="ui-toggle-id" />
<div class="Content">content</div>
<label class="Util-cssToggleLabel" for="Promotion-tags-toggle">
<span class="Toggle-expanded">+</span>
<span class="Toggle-collapsed">-</span>
</label>#ui-toggle-id ~ .Content {
display: none;
}
#ui-toggle-id:checked ~ .Content {
display: block;
}Updated 6 months ago
