Create a checkbox widget
Examples
if (FALSE) { # \dontrun{
quick_app(
layout = vstack(
checkbox("Enable notifications", value = TRUE, id = "notif"),
checkbox("Dark mode", value = FALSE, id = "dark"),
static("", id = "status"),
id = "root"
),
on_change = list(
notif = function(event, state) {
update(state$app, "status",
content = paste("Notifications:", event$value))
state
},
dark = function(event, state) {
dark_toggle(state$app, event$value)
state
}
)
)
} # }
