Switch
Installation
Usage
<rh-switch id="a" checked></rh-switch>
<label for="a">
<span data-state="on">Message when on</span>
<span data-state="off" hidden>Message when off</span>
</label>
rh-switch
None
DOM Property | Description | Type | Default |
---|---|---|---|
label |
|
|
|
showCheckIcon |
|
|
|
checked |
|
|
|
disabled |
|
|
|
accessibleLabel |
|
|
|
messageOn |
|
|
|
messageOff |
|
|
|
reversed |
|
|
Method Name | Description |
---|---|
formDisabledCallback(disabled: boolean) |
Event Name | Description |
---|---|
change |
None
CSS Property | Description | Default |
---|---|---|
--rh-switch-unchecked |
The background color of the switch when it is unchecked. |
—
|
--rh-switch-checked |
The background color of the switch when it is checked. |
—
|
--rh-switch-disabled |
The background color of the switch when it is disabled. |
—
|
None
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.