Checkbox Group Input Control

checkboxGroupInput(inputId, label, choices, selected = NULL, inline = FALSE,
  width = NULL)


inputId The input slot that will be used to access the value.
label Display label for the control, or NULL for no label.
choices List of values to show checkboxes for. If elements of the list are named then that name rather than the value is displayed to the user.
selected The values that should be initially selected, if any.
inline If TRUE, render the choices inline (i.e. horizontally)
width The width of the input, e.g. '400px', or '100%'; see validateCssUnit.


A list of HTML elements that can be added to a UI definition.


Create a group of checkboxes that can be used to toggle multiple choices independently. The server will receive the input as a character vector of the selected values.


checkboxGroupInput("variable", "Variable:", c("Cylinders" = "cyl", "Transmission" = "am", "Gears" = "gear"))
<div id="variable" class="form-group shiny-input-checkboxgroup shiny-input-container"> <label class="control-label" for="variable">Variable:</label> <div class="shiny-options-group"> <div class="checkbox"> <label> <input type="checkbox" name="variable" value="cyl"/> <span>Cylinders</span> </label> </div> <div class="checkbox"> <label> <input type="checkbox" name="variable" value="am"/> <span>Transmission</span> </label> </div> <div class="checkbox"> <label> <input type="checkbox" name="variable" value="gear"/> <span>Gears</span> </label> </div> </div> </div>