Toggle

View code

Use





HTML


	<rg-toggle text="Now also **supports** text!"></rg-toggle>
	

JavaScript


var tags = riot.mount('rg-toggle', {
  toggle: {
    style: 'default|brand|info|success|warning|error',
    checked: true
  }
})

tags[0].on('toggle', function (checked) { ... })