DevExtreme Angular - Overview

The TabPanel is a widget consisting of the Tabs and MultiView widgets. It automatically synchronizes the selected tab with the currently displayed view and vice versa.

View Demo

The following code adds a simple TabPanel to your page.

HTML
TypeScript
  • <dx-tab-panel
  • [items]="tabPanelItems">
  • </dx-tab-panel>
  • import { DxTabPanelModule } from 'devextreme-angular';
  • // ...
  • export class AppComponent {
  • tabPanelItems = [{
  • title: 'Info',
  • text: 'This is Info Tab'
  • }, {
  • title: 'Contacts',
  • text: 'This is Contacts Tab'
  • }, {
  • title: 'Address',
  • text: 'This is Address Tab'
  • }];
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxTabPanelModule
  • ],
  • // ...
  • })

Note that field names in these data source items are conventional. This provides a default appearance for tabs and views; that is, title goes to the tab, and text goes to the view. But more often, data source objects have fields with different names. For correct rendering in these cases, specify a custom template.

See Also