Your search did not match any results.


The Tabs component allows you to create a tabbed UI to navigate between pages or views. You can create tab items in the items array, or populate tab items from a dataSource.

Configure Overflow Behavior

The Tabs component stretches to fit its container if you do not specify the component's width. When the total tab width exceeds the component’s width, navigation buttons appear. A user can click these buttons to scroll through the tabs. Use the showNavButtons and scrollByContent properties to control this behavior.

Customize Tab Contents and Appearance

You can initialize a tab’s contents (text, icons and badges) with values from underlying data objects. This example demonstrates this technique. You can also specify an item template (itemTemplate) to customize tabs.

Process Tab Selection

Specify the selectedIndex property to select a specific tab. Use the onItemClick function to process clicks on tabs.

Backend API
@{ var longTabs = new[] { "user" , "analytics", "customers", "search", "favorites", "additional", "clients", "orders", "shipment" }; var tabs = new[] { new { id = 0, text = "user", icon = "user", content = "User tab content" }, new { id = 1, text = "comment", icon = "comment", content = "Comment tab content" }, new { id = 2, text = "find", icon = "find", content = "Find tab content" } }; } <div id="longtabs"> <div class="caption">Tabs</div> @(Html.DevExtreme().Tabs() .DataSource(longTabs) ) </div> <div id="scrolledtabs"> <div class="caption">Tabs with Overflow</div> @(Html.DevExtreme().Tabs() .DataSource(longTabs) .Width(300) .ScrollByContent(true) .ShowNavButtons(true) ) </div> <div id="tabs"> <div class="caption">API</div> @(Html.DevExtreme().Tabs() .ID("tabs-container") .DataSource(tabs) .SelectedIndex(0) .OnItemClick("tabs_itemClick") ) <div class="content dx-fieldset"> <div class="dx-field"> <div class="dx-field-label">Selected index:</div> <div class="dx-field-value"> @(Html.DevExtreme().SelectBox() .ID("selectbox") .DataSource(tabs) .Value(0) .InputAttr("aria-label", "Tab") .DisplayExpr("text") .ValueExpr("id") .OnValueChanged("selectBox_valueChanged") ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Selected content:</div> <div class="dx-field-value-static left-aligned"> User tab content <div> </div> </div> </div> </div> </div> <script> function tabs_itemClick(e) { var selectBox = $("#selectbox").dxSelectBox("instance"); selectBox.option("value",; } function selectBox_valueChanged(e) { var tabsInstance = $("#tabs-container").dxTabs("instance"); var tabs = tabsInstance.getDataSource().items(); tabsInstance.option("selectedIndex", e.value); $(".left-aligned").text(tabs[e.value].content); } </script>
using Microsoft.AspNetCore.Mvc; using DevExtreme.NETCore.Demos.Models.SampleData; namespace DevExtreme.NETCore.Demos.Controllers { public class TabsController : Controller { public ActionResult Overview() { return View(); } } }
.content{ text-align: justify; margin-top: 25px; } #longtabs{ margin-top: 20px; } #scrolledtabs { margin-top: 20px; } #tabs { margin-top: 60px; } .caption{ font-size: 16px; padding-bottom: 3px; padding-left: 10px; } .left-aligned { text-align: left; }