Tabs
A simple way to implement tabs. Works well above another container abover or below. Set the container spacing property to none.
It also understand the role material design role 'card'
Properties
- tab_titles:
list[str]
The titles of each tab.
- active_tab_index:
int
Which tab should be active.
- active_background:
color
the background of the active tab. It is suggested you add opacity e.g. #2196F344
- foreground:
color the color of the highlight and text. Defaults to the apps primary color. Do not add opacity.
- background:
color the background for all tabs. Defaults to
"transparent"- role:
set the role to
'card'or create your own role- align:
str
"left","right","center"or"full"- bold:
bool
applied to all tabs
- italic:
bool
applied to all tabs
- font_size:
int
applied to all tabs
- font:
str
applied to all tabs
- visible:
Boolean
Is the component visible
- spacing_above:
String
One of
"none","small","medium","large"- spacing_below:
String
One of
"none","small","medium","large"
Events
- tab_click:
When any tab is clicked. Includes the parameters
tab_indextab_titleandtab_componentas part of theevent_args- show:
When the component is shown
- hide:
When the component is hidden