Skip to content

Styling ft.Tabs #3588

Answered by burhansvural
kspviswa asked this question in Q&A
Discussion options

You must be logged in to vote

@kspviswa
Yes, this is possible

import flet as ft


def main(page: ft.Page):
    page.fonts = {
        "font1": "fonts/DancingScript-Regular.ttf"
    }

    t = ft.Tabs(
        selected_index=1,
        animation_duration=300,
        tabs=[
            ft.Tab(
                content=ft.Container(
                    content=ft.Text(
                        value="This is Tab 1",
                    ),
                    alignment=ft.alignment.center,
                ),
                tab_content=ft.Text("Tab 1", font_family="font1", italic=True)
            ),
            ft.Tab(
                tab_content=ft.Icon(ft.icons.SEARCH),
                content=ft.Text("This is Tab 2"),
…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kspviswa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants