Py.Cafe

iisakkirotko/

solara-theme-toggle-tabs

Solara App with Theme Toggle and Tabs

DocsPricing
  • app.py
  • requirements.txt
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import solara
import solara.lab

@solara.component
def Page():

    with solara.AppBar():
        with solara.lab.Tabs():
            with solara.lab.Tab('Home'):
                solara.Text('Some content')

                with solara.lab.Tabs():
                    with solara.lab.Tab('Example-1'):
                        solara.Text('Example-1-content')
                    with solara.lab.Tab('Example-2'):
                        solara.Text('Example-2-content')

            with solara.lab.Tab('About'):
                solara.Text('About')
            with solara.lab.Tab('Contact'):
                solara.Text('Contact')


@solara.component
def Layout(children=[]):
    solara.AppLayout(color="", children=children)