Creates a radio button input.

f7Radio(inputId, label, choices = NULL, selected = NULL)

Arguments

inputId

Radio input id.

label

Radio label

choices

List of choices.

selected

Selected element. NULL by default.

Examples

if(interactive()){ library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "My app", f7SingleLayout( navbar = f7Navbar(title = "f7Radio"), f7Radio( inputId = "radio", label = "Choose a fruit:", choices = c("banana", "apple", "peach"), selected = "apple" ), plotOutput("plot") ) ), server = function(input, output) { output$plot <- renderPlot({ if (input$radio == "apple") hist(mtcars[, "mpg"]) }) } ) }