| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/input-checkbox.R |
| 3 |
\name{checkboxInput} |
| 4 |
\alias{checkboxInput} |
| 5 |
\title{Checkbox Input Control} |
| 6 |
\usage{ |
| 7 |
checkboxInput(inputId, label, value = FALSE, width = NULL) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{inputId}{The \code{input} slot that will be used to access the value.} |
| 11 |
|
| 12 |
\item{label}{Display label for the control, or \code{NULL} for no label.} |
| 13 |
|
| 14 |
\item{value}{Initial value (\code{TRUE} or \code{FALSE}).} |
| 15 |
|
| 16 |
\item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'}; |
| 17 |
see \code{\link[=validateCssUnit]{validateCssUnit()}}.} |
| 18 |
} |
| 19 |
\value{ |
| 20 |
A checkbox control that can be added to a UI definition. |
| 21 |
} |
| 22 |
\description{ |
| 23 |
Create a checkbox that can be used to specify logical values. |
| 24 |
} |
| 25 |
\section{Server value}{ |
| 26 |
|
| 27 |
\code{TRUE} if checked, \code{FALSE} otherwise. |
| 28 |
} |
| 29 |
|
| 30 |
\examples{ |
| 31 |
## Only run examples in interactive R sessions |
| 32 |
if (interactive()) { |
| 33 |
|
| 34 |
ui <- fluidPage( |
| 35 |
checkboxInput("somevalue", "Some value", FALSE), |
| 36 |
verbatimTextOutput("value") |
| 37 |
) |
| 38 |
server <- function(input, output) { |
| 39 |
output$value <- renderText({ input$somevalue }) |
| 40 |
} |
| 41 |
shinyApp(ui, server) |
| 42 |
} |
| 43 |
|
| 44 |
} |
| 45 |
\seealso{ |
| 46 |
\code{\link[=checkboxGroupInput]{checkboxGroupInput()}}, \code{\link[=updateCheckboxInput]{updateCheckboxInput()}} |
| 47 |
|
| 48 |
Other input elements: |
| 49 |
\code{\link{actionButton}()}, |
| 50 |
\code{\link{checkboxGroupInput}()}, |
| 51 |
\code{\link{dateInput}()}, |
| 52 |
\code{\link{dateRangeInput}()}, |
| 53 |
\code{\link{fileInput}()}, |
| 54 |
\code{\link{numericInput}()}, |
| 55 |
\code{\link{passwordInput}()}, |
| 56 |
\code{\link{radioButtons}()}, |
| 57 |
\code{\link{selectInput}()}, |
| 58 |
\code{\link{sliderInput}()}, |
| 59 |
\code{\link{submitButton}()}, |
| 60 |
\code{\link{textAreaInput}()}, |
| 61 |
\code{\link{textInput}()}, |
| 62 |
\code{\link{varSelectInput}()} |
| 63 |
} |
| 64 |
\concept{input elements} |