input_switch | R Documentation |
Adds a single toggle, displayed as a switch or checkbox to a website.
input_switch(label, id = label, ..., note = NULL, default_on = FALSE,
as.checkbox = FALSE)
label |
Label of the input for the user. |
id |
Unique id of the element to be created. |
... |
Additional attributes to set on the element. |
note |
Text to display as a tooltip for the input. |
default_on |
Logical; if |
as.checkbox |
Logical; if |
A character vector of the contents to be added.
For a group of switches, checkboxes, or radio buttons, use input_checkbox
.
## Not run:
input_switch("Label")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.