awesomeRadio: Awesome Radio Buttons Input Control

Description Usage Arguments Value Examples

View source: R/input-awesomeradio.R

Description

Create a set of prettier radio buttons used to select an item from a list.

Usage

1
2
awesomeRadio(inputId, label, choices, selected = NULL, inline = FALSE,
  status = "primary", checkbox = FALSE)

Arguments

inputId

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

label

Input label.

choices

List of values to select from (if elements of the list are named then that name rather than the value is displayed to the user)

selected

The initially selected value

inline

If TRUE, render the choices inline (i.e. horizontally)

status

Color of the buttons

checkbox

Checkbox style

Value

A set of radio buttons that can be added to a UI definition.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Only run examples in interactive R sessions
if (interactive()) {

ui <- fluidPage(
  awesomeRadio(inputId = "somevalue", choices = c("A", "B", "C")),
  verbatimTextOutput("value")
)
server <- function(input, output) {
  output$value <- renderText({ input$somevalue })
}
shinyApp(ui, server)
}

aghozlane/shinyWidgets documentation built on May 5, 2019, 8:01 p.m.