You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Use the <toggle> tag to add and configure the toggle selector. The toggle does not require additional confirmation, so any methods related to it will be called immediately as the toggle position changes.

Available attributes:

AttributeTypeMandatoryDescription
checkedBooleanNTo enable the toggle, set the value to true. The default value is false.
disabledBooleanNTo disable the toggle for users, set the value to false. The default value is false.
onChangeFunctionNSpecify a function called when the position is changed. Set the attribute value to the custom s_widget_custom method created in the client script.
textStringNSpecify the text that explains how the toggle works. 
isLeftSideTextBooleanNTo locate the text on the left of the toggle, set the value to true. The default value is false.
boldTextBooleanNTo make the text of the toggle bold, set the value to true. The default value is false.

Example:

toggle
<toggle text={data.text} disabled="true"></toggle>


  • No labels