tabs in left drawer #3029
-
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
May 7, 2024
Replies: 2 comments
-
Hi @atticus-lv!
with ui.left_drawer().classes('bg-blue-50 w-full px-0').props('width=150 breakpoint=500') as left_drawer:
with ui.tabs().props('vertical switch-indicator swipeable').classes('w-full') as tabs:
ui.tab('A')
ui.tab('B')
ui.tab('C')
with ui.tab_panels(tabs, value='A').classes('w-full').props('transition-prev=jump-up transition-next=jump-up'):
with ui.tab_panel('A'):
ui.label('Content of A')
with ui.tab_panel('B'):
ui.label('Content of B')
with ui.tab_panel('C'):
ui.label('Content of C') |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
atticus-lv
-
thanks~ that is what I want from nicegui import app, ui
def basic():
with ui.header().classes(replace='row items-center') as header:
ui.button(on_click=lambda: left_drawer.toggle(), icon='menu').props('flat color=white')
with ui.footer(value=False) as footer:
ui.label('Footer')
with ui.left_drawer().classes('bg-blue-50 w-full px-0 p-0').props('width=100 breakpoint=500') as left_drawer:
with ui.tabs().props('vertical switch-indicator swipeable').classes('w-full') as tabs:
ui.tab('A')
ui.tab('B')
ui.tab('C')
with ui.tab_panels(tabs, value='A').classes('w-full').props('transition-prev=jump-up transition-next=jump-up'):
with ui.tab_panel('A'):
ui.label('Content of A')
with ui.tab_panel('B'):
ui.label('Content of B')
with ui.tab_panel('C'):
ui.label('Content of C')
basic()
ui.run(native=True) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @atticus-lv!
ui.tab_panels
, not theui.tabs
.