TabBarTheme
Customizes the appearance of TabBar control across the app.
Properties
divider_color- Overrides the default value for flet.TabBar.divider_color.divider_height- Overrides the default value for flet.TabBar.divider_height.indicator- Overrides the default value for flet.TabBar.indicator.indicator_animation- Overrides the default value for flet.TabBar.indicator_animation.indicator_color- Overrides the default value for flet.TabBar.indicator_color.indicator_size- Overrides the default value for flet.TabBar.indicator_size.label_color- Overrides the default value for flet.TabBar.label_color.label_padding- Overrides the default value for flet.TabBar.label_padding.label_text_style- Overrides the default value for flet.TabBar.label_text_style.mouse_cursor- Overrides the default value for flet.TabBar.mouse_cursor.overlay_color- Overrides the default value for flet.TabBar.overlay_color.splash_border_radius- Overrides the default value for flet.TabBar.splash_border_radius.tab_alignment- Overrides the default value for flet.TabBar.tab_alignment.unselected_label_color- Overrides the default value for flet.TabBar.unselected_label_color.unselected_label_text_style- Overrides the default value for flet.TabBar.unselected_label_text_style.
Properties
divider_colorclass-attributeinstance-attribute
divider_color: Optional[ColorValue] = NoneOverrides the default value for flet.TabBar.divider_color.
divider_heightclass-attributeinstance-attribute
divider_height: Optional[Number] = NoneOverrides the default value for flet.TabBar.divider_height.
indicatorclass-attributeinstance-attribute
indicator: Optional[UnderlineTabIndicator] = NoneOverrides the default value for flet.TabBar.indicator.
indicator_animationclass-attributeinstance-attribute
indicator_animation: Optional[TabIndicatorAnimation] = NoneOverrides the default value for flet.TabBar.indicator_animation.
indicator_colorclass-attributeinstance-attribute
indicator_color: Optional[ColorValue] = NoneOverrides the default value for flet.TabBar.indicator_color.
indicator_sizeclass-attributeinstance-attribute
indicator_size: Optional[TabBarIndicatorSize] = NoneOverrides the default value for flet.TabBar.indicator_size.
label_colorclass-attributeinstance-attribute
label_color: Optional[ColorValue] = NoneOverrides the default value for flet.TabBar.label_color.
label_paddingclass-attributeinstance-attribute
label_padding: Optional[PaddingValue] = NoneOverrides the default value for flet.TabBar.label_padding.
label_text_styleclass-attributeinstance-attribute
label_text_style: Optional[TextStyle] = NoneOverrides the default value for flet.TabBar.label_text_style.
mouse_cursorclass-attributeinstance-attribute
mouse_cursor: Optional[ControlStateValue[Optional[MouseCursor]]] = NoneOverrides the default value for flet.TabBar.mouse_cursor.
overlay_colorclass-attributeinstance-attribute
overlay_color: Optional[ControlStateValue[ColorValue]] = NoneOverrides the default value for flet.TabBar.overlay_color.
splash_border_radiusclass-attributeinstance-attribute
splash_border_radius: Optional[BorderRadiusValue] = NoneOverrides the default value for flet.TabBar.splash_border_radius.
tab_alignmentclass-attributeinstance-attribute
tab_alignment: Optional[TabAlignment] = NoneOverrides the default value for flet.TabBar.tab_alignment.
unselected_label_colorclass-attributeinstance-attribute
unselected_label_color: Optional[ColorValue] = NoneOverrides the default value for flet.TabBar.unselected_label_color.
unselected_label_text_styleclass-attributeinstance-attribute
unselected_label_text_style: Optional[TextStyle] = NoneOverrides the default value for flet.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),
},
)
)