Toggle

For turning things on and off. Similiar to a checkbox, but changes should be immediate. It won’t just be selecting an option (like with a checkbox) but the selection will also be submitted instantly.

Note that this component does not manage it’s own ‘checked’ state. You will need to listen to the funChange event and change the checked state yourself.

Accessibility

The toggle must have a tooltip describing what’s being toggled. Use the tooltip attribute to set this description, the tooltip will be used as label for screen readers.

Examples

Specifications

Properties

Property Attribute Required Description
checked checked If the toggle is checked or not.
disabled disabled Disabled toggles cannot be changed.
name name true The name of this input.
size size Size
tooltip tooltip true A describing text for the toggle, will be used as label for screen readers

Events

Name Description
funChange Emitted when the control is toggled.

Search Gunnel

Powered byAlgolia