Description Usage Arguments Value Examples
View source: R/input-awesomeradio.R
Create a set of prettier radio buttons used to select an item from a list.
1 2 | awesomeRadio(inputId, label, choices, selected = NULL, inline = FALSE,
status = "primary", checkbox = FALSE)
|
inputId |
The |
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 |
A set of radio buttons that can be added to a UI definition.
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.