Last chance! 50% off unlimited learning
Sale ends in
Create a checkbox that can be used to specify logical values.
checkboxInput(inputId, label, value = FALSE, width = NULL)
The input
slot that will be used to access the value.
Display label for the control, or NULL
for no label.
Initial value (TRUE
or FALSE
).
The width of the input, e.g. '400px'
, or '100%'
;
see validateCssUnit
.
A checkbox control that can be added to a UI definition.
checkboxGroupInput
, updateCheckboxInput
Other input elements: actionButton
,
checkboxGroupInput
,
dateInput
, dateRangeInput
,
fileInput
, numericInput
,
passwordInput
, radioButtons
,
selectInput
, sliderInput
,
submitButton
, textAreaInput
,
textInput
, varSelectInput
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
checkboxInput("somevalue", "Some value", FALSE),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab