A shadcn switch (toggle). input$<inputId> is a logical.
Usage
shad_switch(
inputId,
label = NULL,
value = FALSE,
disabled = FALSE,
description = NULL,
class = NULL,
...
)See also
Other shadshiny tier-2 components:
shad_calendar(),
shad_checkbox(),
shad_combobox(),
shad_date_picker(),
shad_date_presets(),
shad_form_field(),
shad_input(),
shad_input_group(),
shad_input_otp(),
shad_native_select(),
shad_radio_group(),
shad_select(),
shad_slider(),
shad_textarea(),
shad_toggle(),
shad_toggle_group()
Examples
shad_switch("wifi", "Wi-Fi", value = TRUE)
#> <div class="shad-switch-row">
#> <button type="button" class="shad-switch" data-shad="switch" role="switch" data-state="checked" id="wifi">
#> <span class="shad-switch__thumb" aria-hidden="true"></span>
#> </button>
#> <label class="shad-label" for="wifi">Wi-Fi</label>
#> </div>