Interface IOptions<T>

An options object for creating a tab bar.

interface IOptions<T> {
    addButtonEnabled?: boolean;
    allowDeselect?: boolean;
    document?: Document | ShadowRoot;
    insertBehavior?: InsertBehavior;
    name?: string;
    orientation?: TabBar.Orientation;
    removeBehavior?: RemoveBehavior;
    renderer?: TabBar.IRenderer<T>;
    tabsMovable?: boolean;
    titlesEditable?: boolean;
}

Type Parameters

  • T

Properties

addButtonEnabled?: boolean

Whether the add button is enabled.

The default is false.

allowDeselect?: boolean

Whether a tab can be deselected by the user.

The default is false.

document?: Document | ShadowRoot

The document to use with the tab bar.

The default is the global document instance.

insertBehavior?: InsertBehavior

The selection behavior when inserting a tab.

The default is 'select-tab-if-needed'.

name?: string

Name of the tab bar.

This is used for accessibility reasons. The default is the empty string.

orientation?: TabBar.Orientation

The layout orientation of the tab bar.

The default is horizontal.

removeBehavior?: RemoveBehavior

The selection behavior when removing a tab.

The default is 'select-tab-after'.

renderer?: TabBar.IRenderer<T>

A renderer to use with the tab bar.

The default is a shared renderer instance.

tabsMovable?: boolean

Whether the tabs are movable by the user.

The default is false.

titlesEditable?: boolean

Whether the titles can be directly edited by the user.

The default is false.