Example:
<div id="my-toggle" x-mojo-element="ToggleButton"></div>
this.toggle = { trueValue:'on', trueLabel:'On', falseValue:'off', falseLabel:'Off' }; this.toggleModel = { value:'on', disabled:false }; this.controller.setupWidget('my-toggle', this.toggle, this.toggleModel);
Screenshot (not representative of example above):
Note that the default visual styles can be overridden using CSS.