Adds a single toggle, displayed as a switch or checkbox to a website.
Arguments
- 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
TRUE
, the switch will start on.- as.checkbox
Logical; if
TRUE
, display the switch as a checkbox.
See also
For a group of switches, checkboxes, or radio buttons, use input_checkbox
.