stepper_navigation behavior #3234
-
QuestionI'd like to get precisions regarding with ui.stepper():
with ui.step():
...
with ui.step():
...
with ui.stepper_navigation():
... is cleaner from a UI perspective (ie. navigation buttons always on page bottom, etc.). with ui.stepper():
with ui.step():
...
with ui.stepper_navigation():
...
with ui.step():
...
with ui.stepper_navigation():
... What is your advice on that situation? Shouldn't this interface be updated somehow? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Right now the structure is similar to Quasar: https://quasar.dev/vue-components/stepper |
Beta Was this translation helpful? Give feedback.
-
In nicegui 1.4.28, following code could show what you say: from nicegui import ui
with ui.card().classes('w-full'):
with ui.stepper().props('vertical') as stepper:
with ui.step('1'):
ui.label('step 1')
with ui.step('2'):
ui.label('step 1')
with ui.step('3'):
ui.label('step 1')
with ui.row():
ui.button('Next', on_click=stepper.next).bind_visibility_from(stepper,'value',backward=lambda x:x!='3')
ui.button('Done',color='green', on_click=lambda :ui.notify(stepper.value)).bind_visibility_from(stepper,'value',backward=lambda x:x=='3')
ui.button('Back', on_click=stepper.previous).props('flat').bind_visibility_from(stepper,'value',backward=lambda x:x!='1')
ui.run() |
Beta Was this translation helpful? Give feedback.
In nicegui 1.4.28, following code could show what you say: