bulmaRadioInput: Add radio buttons

View source: R/bulma-input.R

bulmaRadioInputR Documentation

Add radio buttons

Description

Add radio buttons.

Usage

bulmaRadioInput(inputId, choices, selected)

Arguments

inputId

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

choices

vector of choices, named or unnamed.

selected

selected radio input.

Author(s)

John Coene, jcoenep@gmail.com

Examples

if(interactive()){
library(shiny)

shinyApp(
  ui = bulmaPage(
   bulmaTitle("Hello Bulma"),
   bulmaRadioInput("select", c("Miles per galon" = "mpg", "Rear axle ratio" = "drat"),
     selected = "mpg"),
   plotOutput("value")
  ),
  server = function(input, output) {
    output$value <- renderPlot(
      plot(1:nrow(mtcars), mtcars[[input$select]])
    )
  }
)
}


JohnCoene/shinybulma documentation built on Nov. 16, 2022, 6:42 p.m.