Skip to main content

addTab()

adds a new tab into a tabbar

addTab(config: object, index: number): void;

Parameters:

  • config: object - an object of a tab. It may include the following properties:
    • tab: string - the name of a tab
    • tabCss: string - the name of the CSS class used for a tab
    • css: string - the name of the CSS class used for a cell
    • header: string - the header of a cell
  • index: number - the position to add a tab into

Example

tabbar.addTab({tab: "tab-" + nextTab++, css:"panel flex"}, 0);

Related sample: Tabbar. Add / remove tab

Change log:

added in v6.4