custom_test.py 286 B

1234567891011
  1. #!/usr/bin/env python3
  2. from nicegui import ui
  3. with ui.card():
  4. custom = ui.custom(on_change=lambda number: label.set_text(f'Custom value: {number}'))
  5. ui.button('Add 100', on_click=lambda: custom.add(100))
  6. label = ui.label()
  7. ui.joystick(on_move=lambda e: print("move", e.vector))