User:Darshanamani/sandbox

var dropdownInput = new OO.ui.DropdownInputWidget( {   options: [        { data: 'a', label: 'First' },        { data: 'b', label: 'Second', disabled: true },        { optgroup: 'Group label' },        { data: 'c', label: 'First sub-item)' } ] } ); $( document.body ).append( dropdownInput.$element );