All docs
V19.1
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
17.2
A newer version of this page is available. Switch to the current version.

DevExtreme jQuery - Control the Behavior

An end user can select Tabs items in two different modes: 'single' (by default) or 'multiple'. You can use the selectionMode option to change the mode.

JavaScript
$(function() {
    $("#tabsContainer").dxTabs({
        items: tabItems,
        selectionMode: "multiple"
    });
});

If you need a tab to be preselected or to select it programmatically, pass its index in the data source array to the selectedIndex option.

JavaScript
var tabs = [
    { text: "User", icon: "user" },
    { text: "Find", icon: "find" },
    { text: "Favorites", icon: "favorites" }
];

$(function() {
    $("#tabsContainer").dxTabs({
        items: tabs,
        // Preselects the tab with index 1
        selectedIndex: 1
    });
});
JavaScript
// Selects the tab with index 0
$("#tabsContainer").dxTabs("option", "selectedIndex", 0);

As an alternative, you can use the selectedItem (for "single" selectionMode) or selectedItems (for "multiple" selectionMode) options.

JavaScript
var tabs = [
    { text: "User", icon: "user" },
    { text: "Find", icon: "find" },
    { text: "Favorites", icon: "favorites" }
];

$(function() {
    $("#tabsContainer").dxTabs({
        items: tabs,
        selectedItem: tabs[1],
        // === or ===
        selectionMode: 'multiple',
        selectedItems: [ tabs[1], tabs[2] ]
    });
});

When the total length of all tabs exceeds the Tabs container, the widget shows navigation buttons that help an end user scroll the tab strip. This behavior is default only for desktops. To enable it on all types of devices, assign true to the showNavButtons option. Otherwise, assign false.

JavaScript
$(function() {
    $("#tabsContainer").dxTabs({
        items: tabs,
        showNavButtons: true
    });
});
See Also