Skip to content

TabBarTheme

Customizes the appearance of TabBar control across the app.

Properties

Properties#

divider_color class-attribute instance-attribute #

divider_color: Optional[ColorValue] = None

Overrides the default value for TabBar.divider_color.

divider_height class-attribute instance-attribute #

divider_height: Optional[Number] = None

Overrides the default value for TabBar.divider_height.

indicator class-attribute instance-attribute #

indicator: Optional[UnderlineTabIndicator] = None

Overrides the default value for TabBar.indicator.

indicator_animation class-attribute instance-attribute #

indicator_animation: Optional[TabIndicatorAnimation] = None

Overrides the default value for TabBar.indicator_animation.

indicator_color class-attribute instance-attribute #

indicator_color: Optional[ColorValue] = None

Overrides the default value for TabBar.indicator_color.

indicator_size class-attribute instance-attribute #

indicator_size: Optional[TabBarIndicatorSize] = None

Overrides the default value for TabBar.indicator_size.

label_color class-attribute instance-attribute #

label_color: Optional[ColorValue] = None

Overrides the default value for TabBar.label_color.

label_padding class-attribute instance-attribute #

label_padding: Optional[PaddingValue] = None

Overrides the default value for TabBar.label_padding.

label_text_style class-attribute instance-attribute #

label_text_style: Optional[TextStyle] = None

Overrides the default value for TabBar.label_text_style.

mouse_cursor class-attribute instance-attribute #

mouse_cursor: Optional[
    ControlStateValue[Optional[MouseCursor]]
] = None

Overrides the default value for TabBar.mouse_cursor.

overlay_color class-attribute instance-attribute #

overlay_color: Optional[ControlStateValue[ColorValue]] = (
    None
)

Overrides the default value for TabBar.overlay_color.

splash_border_radius class-attribute instance-attribute #

splash_border_radius: Optional[BorderRadiusValue] = None

Overrides the default value for TabBar.splash_border_radius.

tab_alignment class-attribute instance-attribute #

tab_alignment: Optional[TabAlignment] = None

Overrides the default value for TabBar.tab_alignment.

unselected_label_color class-attribute instance-attribute #

unselected_label_color: Optional[ColorValue] = None

Overrides the default value for TabBar.unselected_label_color.

unselected_label_text_style class-attribute instance-attribute #

unselected_label_text_style: Optional[TextStyle] = None

Overrides the default value for TabBar.unselected_label_text_style.

Examples#

Example 1#

page.theme = ft.Theme(
    tabs_theme=ft.TabBarTheme(
        divider_color=ft.Colors.BLUE,
        indicator_color=ft.Colors.RED,
        indicator_tab_size=True,
        label_color=ft.Colors.GREEN,
        unselected_label_color=ft.Colors.AMBER,
        overlay_color={
            ft.MaterialState.FOCUSED: ft.Colors.with_opacity(0.2, ft.Colors.GREEN),
            ft.MaterialState.DEFAULT: ft.Colors.with_opacity(0.2, ft.Colors.PINK),
        },
    )
)