Your search did not match any results.



This demo illustrates how to display an icon within the Button widget. You can use a built-in or external font, or use an image as an icon.

Copy to CodePen
window.onload = function() { var viewModel = { doneButton: { icon: "check", type: "success", text: "Done", onClick: function(e) { DevExpress.ui.notify("The Done button was clicked"); } }, weatherButton: { icon: "../../../../images/icons/weather.png", text: "Weather", onClick: function(e) { DevExpress.ui.notify("The Weather button was clicked"); } }, sendButton: { icon: 'fa fa-envelope-o', text: "Send", onClick: function(e) { DevExpress.ui.notify("The Send button was clicked"); } }, plusButton: { icon: "plus", onClick: function(e) { DevExpress.ui.notify("The button was clicked"); } }, backButton: { icon: "back", onClick: function(e) { DevExpress.ui.notify("The button was clicked"); } }, doneDisabledButton: { icon: "check", type: "success", text: "Done", disabled: true }, weatherDisabledButton: { icon: "../../../../images/icons/weather.png", text: "Weather", disabled: true }, sendDisabledButton: { icon: 'fa fa-envelope-o', text: "Send", disabled: true }, plusDisabledButton: { icon: "plus", disabled: true }, backDisabledButton: { icon: "back", disabled: true } }; ko.applyBindings(viewModel, document.getElementById("demo")); };
<!DOCTYPE html> <html xmlns=""> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src=""></script> <script src=""></script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href=""> <script src=""></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="demo"> <div class="dx-fieldset"> <div class="dx-field"> <div class="dx-field-label">Built-in icon</div> <div class="dx-field-value"> <div data-bind="dxButton: doneButton"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">Image icon</div> <div class="dx-field-value"> <div data-bind="dxButton: weatherButton"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">External icon</div> <div class="dx-field-value"> <div data-bind="dxButton: sendButton" class="send"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">Icon only</div> <div class="dx-field-value"> <div data-bind="dxButton: plusButton"></div> <div data-bind="dxButton: backButton"></div> </div> </div> </div> <div class="dx-fieldset"> <div class="dx-fieldset-header">DISABLED</div> <div class="dx-field"> <div class="dx-field-value"> <div data-bind="dxButton: doneDisabledButton"></div> </div> </div> <div class="dx-field"> <div class="dx-field-value"> <div data-bind="dxButton: weatherDisabledButton"></div> </div> </div> <div class="dx-field"> <div class="dx-field-value"> <div data-bind="dxButton: sendDisabledButton" class="send"></div> </div> </div> <div class="dx-field"> <div class="dx-field-value"> <div data-bind="dxButton: plusDisabledButton"></div> <div data-bind="dxButton: backDisabledButton"></div> </div> </div> </div> </div> </div> </body> </html>
.dx-viewport:not(.dx-theme-ios7) .dx-fieldset { width: 520px; margin: 30px auto; } .dx-viewport:not(.dx-theme-ios7) .dx-fieldset:first-child { margin-top: 120px; } .dx-viewport:not(.dx-theme-ios7) .dx-fieldset-header { font-size: 16px; } .dx-viewport:not(.dx-theme-ios7) .dx-field { display: inline-block; margin-right: 20px; } .dx-viewport:not(.dx-theme-ios7) .dx-field-value:not(.dx-widget) > .dx-button { float: none; } .dx-viewport:not(.dx-theme-ios7) .dx-field-value:not(.dx-switch):not(.dx-checkbox):not(.dx-button), .dx-viewport:not(.dx-theme-ios7) .dx-field-label { float: none; width: 100%; } .dx-viewport:not(.dx-theme-ios7) .dx-field-label { padding-left: 0; } .send .dx-button-content .dx-icon { font-size: 18px; }