Select

View code

Use

HTML

<rg-select></rg-select>

JavaScript

var tags = riot.mount('rg-select', {
  select: {
    placeholder: 'Please select a card',
    options: [{
      id: 0,
      text: 'Visa'
    }, {
      id: 1,
      text: 'MasterCard'
      //selected: true
    }, {
      id: 2,
      text: 'American Express'
    }, {
      id: 3,
      text: 'Discover'
    }]
  }
})

tags[0].on('open', function () { ... })
       .on('close', function () { ... })
       .on('select', function (item) { ... })