Ext.create('Ext.button.Cycle', { showText: true, prependText: 'View as ', renderTo: 'abcd',//html: '<div id="abcd"><div>' menu: { id: 'view-type-menu', items: [{ text: 'text only', iconCls: 'view-text', checked: true },{ text: 'HTML', iconCls: 'view-html' }] }, changeHandler: function(cycleBtn, activeItem) { Ext.Msg.alert('Change View', activeItem.text); } });