ESwitch Switch
Examples
Switch
Switch
Properties
accessibleNamestringName read by assistive technologies; provide a readable name for controls without text.
textactiveColorcolorActive or selected color.
Dynamic bindingactiveIconintIcon used by the component.
EIcons.*
0 (no icon)
0activeTextstringText for the active or inactive state.
""activeValuevarValue associated with checked or active state.
truebeforeChangevarGuard before changing switch state, returning a boolean or Promise.
nullcheckedboolWhether the control is checked or active.
falsedurationintAnimation or display duration in milliseconds; the component binding identifies its use.
300enabledboolAllow interaction; false disables the control.
truefontfontFont settings for the family, size and text style.
Common fields:
family, pixelSize, pointSize
bold, italic, weight
underline, strikeout
letterSpacing, wordSpacing
application fontheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightinactiveColorcolorInactive color.
Dynamic bindinginactiveIconintIcon used by the component.
EIcons.*
0 (no icon)
0inactiveTextstringText for the active or inactive state.
""inactiveValuevarValue associated with unchecked or inactive state.
falseloadingboolWhether the component is loading.
falsesizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaulttextstringDisplayed text.
checked ? activeText : inactiveTextvalidateEventboolRequest enclosing-form validation when the value changes.
truevaluevarCurrent value; read or write through property bindings, with arrays for multiple or range selection.
undefinedvisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthSignals
changeRejected(string message)Emitted when a state change is rejected; message explains why.