Fork me on GitHub

Also, check out the Slider Widget page for other techniques.

Range Slider Widget

form.elements['volume'] = {
  type: 'range',
  title: 'Volume',
  attributes: {
    'min': '0',
    'max': '11',
    'value': '11',
    'data-theme': 'b'
  }
};