Learn R Programming

shinyWidgets (version 0.3.0)

awesomeCheckbox: Awesome Checkbox Input Control

Description

Create a Font Awesome Bootstrap checkbox that can be used to specify logical values.

Usage

awesomeCheckbox(inputId, label, value = FALSE, status = "primary",
  width = NULL)

Arguments

inputId

The input slot that will be used to access the value.

label

Input label.

value

Initial value (TRUE or FALSE).

status

Color of the buttons

width

The width of the input

Value

A checkbox control that can be added to a UI definition.

Examples

Run this code
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {

ui <- fluidPage(
 awesomeCheckboxGroup(
  inputId = "Id001",
  label = "Checkboxes with status",
  choices = c("A", "B", "C"),
  inline = TRUE, status = "danger"
 ),
 verbatimTextOutput("value")
)
server <- function(input, output) {
  output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab