custom_test.py 230 B

123456789
  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()