The TagBox widget is an editor that allows an end user to select multiple items from a drop-down list.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/tag_box
TagBox interactive configuration
Copy Code
Copy to Codepen


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

  • jQuery
    Use the dxTagBox jQuery plug-in.

    <div id="tagBox"></div>
    var tagBoxData = [
        { "name": "Alabama", "capital": "Montgomery" },
        { "name": "Alaska", "capital": "Juneau" },
        { "name": "Arizona", "capital": "Phoenix" }
        . . .
        dataSource: tagBoxData,
        valueExpr: 'capital',
        displayExpr: 'name'
  • Knockout
    Add a div element and apply the dxTagBox binding to this element.

    <div data-bind="dxTagBox: {
        dataSource: tagBoxData,
        valueExpr: 'capital',
        displayExpr: 'name'
  • AngularJS
    Add a div element and apply the dx-tag-box directive to this element.

    <div dx-tag-box="{
        dataSource: tagBoxData,
        valueExpr: 'capital',
        displayExpr: 'name'

Note that DevExtreme widgets require you to link the jQuery library 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.

The TagBox widget supports common Collection Container and Editor widget functionality. You can find detailed information on the principles of working with the widget in the dxTagBox section of the Editor Widgets article. For information on using the Collection Container functionality, refer to the Collection Container Widgets guide.

View Demo

Watch Video

Show Example:


An object defining configuration options for the TagBox widget.


This section describes members used to manipulate the widget.


This section describes events fired by this widget.

Default Item Template

This section lists the data source fields that are used in a default item template.

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is the list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also