DevExtreme React - Control the Behavior

An end user can switch the views by swiping them or selecting tabs. Note that tab navigation is always enabled, while swiping is active only on touch devices by default. To enable it on all types of devices, assign true to the swipeEnabled option. Otherwise, assign false.

JavaScript
$(function() {
    $("#tabPanelContainer").dxTabPanel({
        items: tabPanelItems,
        swipeEnabled: false
    });
});

You can switch the views progrmmatically using the selectedIndex or selectedItem option.

JavaScript
$(function() {
    $("#tabPanelContainer").dxTabPanel({
        items: tabPanelItems,
        selectedIndex: 1
    });
});

The TabPanel can loop the views, which enables an end user to swipe through the last view to the first and vice versa. Views are looped by default. To disable looping, assign false to the loop option.

JavaScript
$(function() {
    $("#tabPanelContainer").dxTabPanel({
        items: tabPanelItems,
        loop: false
    });
});

To specify whether or not to animate switching between views, use the animationEnabled option.

JavaScript
$(function() {
    $("#tabPanelContainer").dxTabPanel({
        items: tabPanelItems,
        animationEnabled: true
    });
});
See Also