awesomeCheckbox: Awesome Checkbox Input Control

Description Usage Arguments Value See Also Examples

View source: R/input-awesomecheckbox.R

Description

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

Usage

1
2
3
4
5
6
7
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, a valid Bootstrap status : default, primary, info, success, warning, danger.

width

The width of the input

Value

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

See Also

updateAwesomeCheckbox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)
}

shinyWidgets documentation built on Sept. 17, 2021, 5:06 p.m.