# NOT RUN {
### One option
checkboxInput(
id = "checkbox1",
choices = "Choice 1",
selected = "Choice 1"
)
### Multiple options
checkboxInput(
id = "checkbox2",
choices = c("Choice 1", "Choice 2")
)
### Inline checkbox
checkboxInput(
id = "checkbox3",
choices = c("Choice 1", "Choice 2", "Choice 3"),
inline = TRUE
)
### Checkbar
checkbarInput(
id = "checks",
choices = c(
"Check 1",
"Check 2",
"Check 3"
),
selected = "Check 1"
) %>%
background("blue") %>%
margin(2)
### Labeling a checkbar
formGroup(
label = "Toppings",
checkbarInput(
id = "fixins",
choices = c(
"Sprinkles",
"Nuts",
"Fudge"
)
)
)
### Switches
switchInput(
id = "switch1",
choices = paste("Switch choice", 1:3),
selected = "Switch choice 3"
) %>%
active("indigo")
# }
Run the code above in your browser using DataLab