Open
Description
Click the button and the background color is not red.
from nicegui import ui
from ex4nicegui import rxui, effect_refreshable, to_ref
@ui.page("/")
def page():
value = to_ref(True)
ui.button("switch", on_click=lambda: value.set_value(not value.value))
@effect_refreshable.on(value)
def _():
with rxui.card().scoped_style("*", "background-color: red;"):
ui.label("text1")
Activity