Skip to content

Tab

Inherits: AdaptiveControl

A Material Design TabBar tab.

Properties

Properties#

height class-attribute instance-attribute #

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 class-attribute instance-attribute #

icon: IconDataOrControl | None = None

An icon to display on the left of Tab text.

icon_margin class-attribute instance-attribute #

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 class-attribute instance-attribute #

label: StrOrControl | None = None

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

Raises: