EThemeSwitch Theme switch
Examples
Theme 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.
falsedarkBorderColorcolorSwitch border color in the dark or light theme.
Dynamic bindingdarkIconColorcolorSwitch icon color in the dark or light theme.
Dynamic bindingdarkThumbColorcolorSwitch thumb color in the dark or light theme.
Dynamic bindingdarkTrackColorcolorSwitch track color in the dark or light theme.
Dynamic bindingdurationintAnimation 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.
falselightBorderColorcolorSwitch border color in the dark or light theme.
Dynamic bindinglightIconColorcolorSwitch icon color in the dark or light theme.
Dynamic bindinglightThumbColorcolorSwitch thumb color in the dark or light theme.
Dynamic bindinglightTrackColorcolorSwitch track color in the dark or light theme.
Dynamic bindingloadingboolWhether the component is loading.
falsesizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaulttextstringDisplayed text.
checked ? activeText : inactiveTexttransitionDurationintAnimation or display duration in milliseconds; the component binding identifies its use.
400validateEventboolRequest 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.
implicitWidthcaptureRootItemRead onlySource capture item or animation overlay for theme transitions.
Computed at runtimedarkboolRead onlyWhether the dark theme is active.
Computed at runtimetransitionRootItemRead onlySource capture item or animation overlay for theme transitions.
Computed at runtimeSignals
changeRejected(string message)Emitted when a state change is rejected; message explains why.
themeChangeRequested()Emitted when the user requests a theme change; connect application theme handling here.