cla-toggle-switch
Toggle switch component.
Usage
<cla-toggle-switch ontext="On" offtext="Off" name="">
Content of label goes here
</cla-toggle-switch>
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
block |
block |
Whether to use the block style variant of the toggle. | boolean |
undefined |
checked |
checked |
Is it Checked ? | boolean |
false |
disabled |
disabled |
Whether the toggle is disabled. | boolean |
false |
inverted |
inverted |
Whether to use the inverted variant of the toggle. | boolean |
undefined |
large |
large |
Whether to use the large variant of the toggle. | boolean |
undefined |
name |
name |
The toggle ID & name | string |
undefined |
offtext |
offtext |
Off/disabled text for inside toggle switch - must be the same length or shorter than the on/enable text | string |
undefined |
ontext |
ontext |
On/Enabled text for inside toggle switch | string |
undefined |
value |
value |
The toggle value | 0 |
undefined |
Events
Event | Description | Type |
---|---|---|
selected |
Emitted when the toggle is selected. | CustomEvent<any> |
unselected |
Emitted when the toggle is unselected. | CustomEvent<any> |
Slots
Slot | Description |
---|---|
Allows label content |
Built with StencilJS