Skip to content

Tab

Inherits: AdaptiveControl

A Material Design TabBar tab.

Properties

Properties#

height #

height: Number | None = None

The height of the tab.

If None, it will be calculated based on the content of the Tab. When icon is not None along with label, the default height is 72.0 pixels. Without an icon, the height is 46.0 pixels.

Currently, the provided tab height cannot be lower than the default height.

icon #

icon: IconDataOrControl | None = None

An icon to display on the left of Tab text.

icon_margin #

icon_margin: MarginValue | None = None

The margin added around the tab's icon.

Only useful when used in combination with icon, and label is not None.

Defaults to 2 pixels of bottom margin. If Theme.use_material3 is False, then defaults to 10 pixels of bottom margin.

label #

label: StrOrControl | None = None

The tab's name. Can be either a string or a control.

Raises: