fun-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 | Type | Default |
---|---|---|---|---|---|
checked | checked | false | If the toggle is checked or not. | boolean | |
disabled | disabled | false | Disabled toggles cannot be changed. | boolean | false |
name | name | true | The name of this input. | string | |
size | size | false | Size | "large" | "regular" | 'regular' |
tooltip | tooltip | true | A describing text for the toggle, will be used as label for screen readers | string |
Events
Name | Description |
---|---|
funChange | Emitted when the control is toggled. |
Dependencies
Depends on
This documentation page generated from the source at fun-toggle.tsx