Slide toggle
The o-slide-toggle
component is used in forms for getting or displaying an on/off control.
The slide toggle component is automatically registered on its parent o-form
, which provides the value for the slide toggle programatically. Its value can be also set manually via the data
parameter. This and other attributes are explained on the API section of this page.
Basic example
<o-form editable-detail="false" show-header="no">
<o-slide-toggle attr="slidetoggle1" label="Slide toggle" [data]="true" read-only="no"></o-slide-toggle>
<o-slide-toggle attr="slidetoggle2" label="Slide toggle disabled" enabled="no"></o-slide-toggle>
</o-form>
You can see this and more examples of this component in the OntimizeWeb playground.
Directive: o-slide-toggle
Inherited inputs
-
from FormDataComponent:
- attr
- automatic-binding
- automatic-registering
- data
- enabled
- label
- read-only
- tooltip
- tooltip-position
- tooltip-show-delay
- validators
Inputs
Name | Description | Default |
---|---|---|
boolean-type number | boolean | string |
The data type of the values managed by the component |
boolean |
color primary | accent | warn |
Theme color palette for the component |
primary |
false-value any |
Value that represents the false value |
false |
label-position before | after |
Indicates whether the label should appear after or before the slide toggle |
after |
true-value any |
Value that represents the true value |
true |
Inherited outputs
-
from FormDataComponent:
- onChange
- onValueChange