input_switch: Add a single switch or checkbox to a website

View source: R/input_switch.R

input_switchR Documentation

Add a single switch or checkbox to a website

Description

Adds a single toggle, displayed as a switch or checkbox to a website.

Usage

input_switch(label, id = label, ..., note = NULL, default_on = FALSE,
  as.checkbox = FALSE)

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.

Value

A character vector of the contents to be added.

See Also

For a group of switches, checkboxes, or radio buttons, use input_checkbox.

Examples

## Not run: 
input_switch("Label")

## End(Not run)

uva-bi-sdad/community documentation built on Oct. 12, 2023, 1:18 p.m.