CheckBox

The dxCheckBox is a small box, which when selected by the end user, shows that a particular feature has been enabled or a specific option has been chosen.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js
CheckBox interactive configuration
Copy Code
Copy to Codepen
$("#checkbox").dxCheckBox({
});

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxCheckBox jQuery plug-in.

    HTML
    <div id="checkBox"></div>
    JavaScript
    $("#checkBox").dxCheckBox({
        text: 'Option enabled',
        value: true
    });
  • Knockout
    Add a div element and apply the dxCheckBox binding to this element.

    HTML
    <div data-bind="dxCheckBox: {
        text: 'Option enabled',
        value: true
    }"></div>
  • AngularJS
    Add a div element and apply the dx-check-box directive to this element.

    HTML
    <div dx-check-box="{
        text: 'Option enabled',
        value: true
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.

You can find detailed information on the principles of working with the widget in the dxCheckBox section of the Editor Widgets article.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxCheckBox widget.

Methods

This section describes the members used to manipulate the widget.

Events

This section describes events fired by this widget.