Skip to contents

Reads bslib's dark-mode switch (input[[id]], "dark" or "light"), for is_dark arguments such as map_sp(), plot_ts(), cc_plotly_theme(). Before the switch has reported (first flush) it is default.

Usage

cc_is_dark(input, id = "dark_toggle", default = TRUE)

Arguments

input

the Shiny input object

id

the switch's id, as given to cc_brand_header()

default

value before the input exists

Value

logical scalar