Created
November 17, 2025 11:52
-
-
Save bulletmark/03b2ce4f41f3b211e96589631c476f33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from nicegui import ui | |
| def add_task(): | |
| if task := input_field.value.strip(): | |
| with list_ui: | |
| ui.item(task) | |
| input_field.value = '' # clear input | |
| with ui.column(): # stack vertically | |
| ui.label('📝 My To-Do List (via Python!)') | |
| input_field = ui.input('Enter a task') | |
| ui.button('Add Task', on_click=add_task) | |
| list_ui = ui.list() | |
| ui.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment