View source: R/input-awesomecheckbox.R
awesomeCheckbox | R Documentation |
Create a Font Awesome Bootstrap checkbox that can be used to specify logical values.
awesomeCheckbox(
inputId,
label,
value = FALSE,
status = "primary",
width = NULL
)
inputId |
The |
label |
Input label. |
value |
Initial value (TRUE or FALSE). |
status |
Color of the buttons, a valid Bootstrap status : default, primary, info, success, warning, danger. |
width |
The width of the input |
A checkbox control that can be added to a UI definition.
updateAwesomeCheckbox
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
awesomeCheckbox(inputId = "somevalue",
label = "A single checkbox",
value = TRUE,
status = "danger"),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.