Create a select list that can be used to choose a single or multiple items from a list of values.
library(shiny)
ui <- fluidPage(
selectInput("id_selectInput",
label = HTML('<B><FONT size="3">What is your favorite color ?</FONT></B>'),
multiple = TRUE,
choices = list("red" = "red", "green" = "green", "blue" = "blue", "yellow" = "yellow"),
selected = NULL),
br(), br(),
fluidRow(column(3, textOutput("text_choice"))))
server <- function(input, output){
output$text_choice <- renderPrint({
return(input$id_selectInput)})
}
shinyApp(ui = ui, server = server)
It's possible to change the settings :
It is also possible to add HTML.