Holo Switch
The <holo-switch> component is a form-associated toggle control that exposes role="switch" semantics instead of checkbox semantics.
Live Previews
Section titled “Live Previews”Off / On
Section titled “Off / On”<holo-switch label="Enable notifications"></holo-switch> <holo-switch label="Enable notifications" checked></holo-switch>Disabled
Section titled “Disabled”<holo-switch label="Enable notifications" disabled></holo-switch>API Reference
Section titled “API Reference”Properties
Section titled “Properties”| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | --------------------------------------------------------------- | --------- | ----------- |
| label | label | The visible label text for the switch. | string | undefined |
| name | name | The form field name submitted with the owning form. | string | undefined |
| value | value | The form value submitted when the switch is on. | string | "on" |
| checked | checked | Whether the switch is on. | boolean | false |
| disabled | disabled | If true, the switch is disabled and non-interactive. | boolean | false |
| required | required | If true, the owning form cannot submit unless the switch is on. | boolean | false |
Events
Section titled “Events”| Event | Description | Type |
| ------------ | -------------------------------------- | ---------------------- |
| holoChange | Emitted when the on/off state changes. | CustomEvent<boolean> |