A button widget.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js

The main purpose of the dxButton widget is to perform a specified action when the button is clicked.

This widget, like any other DevExtreme UI widget, can be created using one of three possible approaches: jQuery, Knockout or AngularJS. The following code demonstrates how to create the dxButton widget using the Knockout approach.

<div data-bind="dxButton: { text: 'Click me', clickAction: buttonClicked }"></div>

Declare a function that handles the button click and pass it to the clickAction configuration option.

var buttonClicked = function(e){
    alert("The button is clicked");
See Also
  • To learn how to create widgets in detail, refer to the Create a Widget article.
Show Example:


An object defining configuration options for the dxButton widget.


This section describes methods that can be used to manipulate a widget.


This section describes events fired by this component.