egroupware_official/api/js/etemplate/Et2Switch/Et2SwitchIcon.md

24 lines
531 B
Markdown
Raw Normal View History

```html:preview
<et2-switch-icon></et2-switch-icon>
```
:::tip
There are multiple components for dealing with boolean yes / no.
* Et2SwitchIcon: This one
* [ButtonToggle](../et2-button-toggle): A button that shows an icon
* [Checkbox](../et2-checkbox): Classic checkbox
* [Switch](../et2-switch): Switch to turn something on or off
:::
## Examples
### Custom icons
Use the `onIcon` and `offIcon` properties to customise what is displayed
```html:preview
<et2-switch-icon onIcon="plus" offIcon="minus"></et2-switch-icon>
```