Description Usage Arguments Value See Also Examples
View source: R/input-checkboxgroup.R
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.
1 | checkboxGroupInput(inputId, label, choices, selected = NULL, inline = FALSE)
|
inputId |
Input variable to assign the control's value to. |
label |
Display label for the control, or |
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 |
A list of HTML elements that can be added to a UI definition.
checkboxInput
, updateCheckboxGroupInput
Other input.elements: animationOptions
,
sliderInput
; checkboxInput
;
dateInput
; dateRangeInput
;
numericInput
; radioButtons
;
selectInput
, selectizeInput
;
submitButton
; textInput
1 2 3 4 | checkboxGroupInput("variable", "Variable:",
c("Cylinders" = "cyl",
"Transmission" = "am",
"Gears" = "gear"))
|
You probably do not want to attach this package (with library() or require()). Instead, you should use shinybootstrap2::withBootstrap2(). You can hide this message with suppressPackageStartupMessages().
<div id="variable" class="control-group shiny-input-checkboxgroup">
<label class="control-label" for="variable">Variable:</label>
<label class="checkbox ">
<input type="checkbox" name="variable" id="variable1" value="cyl"/>
<span>Cylinders</span>
</label>
<label class="checkbox ">
<input type="checkbox" name="variable" id="variable2" value="am"/>
<span>Transmission</span>
</label>
<label class="checkbox ">
<input type="checkbox" name="variable" id="variable3" value="gear"/>
<span>Gears</span>
</label>
</div>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.