The ToggleButton control represents a button with two states, pressed and non-pressed. It displays text, icon, or both in the same manner as a simple button. Users can use ToggleButton as a switch to turn a setting on or off. ToggleButton can also be used to represent an independent choice similar to a CheckBox. By applying additional custom CSS-styling classes, applications can give a different style to any ToggleButton.
The ToggleButton can be displayed in lite-button style by using the lite
property. Depending on the used theme the button is displayed less prominent.
ToggleButtons can be displayed "native" without any own CSS-styling using the styled
property.
This is useful for applications which need a special application-dependent style for ToggleButtons. Using the function addStyleClass
applications can add their own style to the ToggleButton.