space_documentation.py 470 B

123456789101112131415161718192021222324
  1. from nicegui import ui
  2. from . import doc
  3. @doc.demo(ui.space)
  4. def main_demo() -> None:
  5. with ui.row().classes('w-full border'):
  6. ui.label('Left')
  7. ui.space()
  8. ui.label('Right')
  9. @doc.demo('Vertical space', '''
  10. This element can also be used to fill vertical space.
  11. ''')
  12. def vertical_demo() -> None:
  13. with ui.column().classes('h-32 border'):
  14. ui.label('Top')
  15. ui.space()
  16. ui.label('Bottom')
  17. doc.reference(ui.space)