Your search did not match any results.
Load Indicator

Overview

Documentation
The LoadIndicator is a UI element notifying the viewer that a process is in progress.
Copy to Codepen
Apply
Reset
window.onload = function() { var viewModel = { buttonOptions: { text: "Send", height: 40, width: 180, template: function(data, container) { $("<div class='button-indicator'></div><span class='dx-button-text'>" + data.text + "</span>").appendTo(container); buttonIndicator = container.find(".button-indicator").dxLoadIndicator({ visible: false }).dxLoadIndicator("instance"); }, onClick: function(data) { data.component.option("text", "Sending"); buttonIndicator.option("visible", true); setTimeout(function() { buttonIndicator.option("visible", false); data.component.option("text", "Send"); }, 2000); } } }; ko.applyBindings(viewModel, document.getElementById("load-indicator")); };
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <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="js/jquery-3.1.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.0/knockout-min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.light.css" /> <link rel="dx-theme" data-theme="android5.light" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.android5.light.css" /> <link rel="dx-theme" data-theme="ios7.default" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.ios7.default.css" /> <link rel="dx-theme" data-theme="win10.black" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.win10.black.css" /> <link rel="dx-theme" data-theme="win10.white" href="https://cdn3.devexpress.com/jslib/16.2.6/css/dx.win10.white.css" /> <script src="https://cdn3.devexpress.com/jslib/16.2.6/js/dx.all.js"></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="load-indicator" class="form"> <div class="label">Custom size</div> <div id="small-indicator" data-bind="dxLoadIndicator: { height: 20, width: 20 }"></div> <div id="medium-indicator" data-bind="dxLoadIndicator: { height: 40, width: 40 }"></div> <div id="large-indicator" data-bind="dxLoadIndicator: { height: 60, width: 60 }"></div> <div class="label">Custom image</div> <div id="image-indicator" data-bind="dxLoadIndicator: { indicatorSrc: '../../../../images/Loading.gif' }"></div> <div class="label">Using with other widgets</div> <div id="button" data-bind="dxButton: buttonOptions"></div> </div> </div> </body> </html>
.form { padding: 10px 0 0 10px; } .label { margin-bottom: 10px; font-size: 16px; } .label:not(:first-child) { margin-top: 30px; } #small-indicator, #medium-indicator, #large-indicator { vertical-align: middle; margin-right: 10px; } #button, #button .dx-button-content { padding: 0; } #button .button-indicator { height: 32px; width: 32px; display: inline-block; vertical-align: middle; margin-right: 5px; }