4

I am using shinythemes to apply bootstrap styling to my app, and shinyWidgets for many of the UI elements. I prefer the functionality and ease of pickerInput over selectizeInput, but I don't like the styling of that one element in the theme I'm using. Is it possible to use the default shiny style sheet for just that one element (i.e., without having to specify all the desired CSS elements as in this post)? I suspect there's some style element name or class I can apply using style options, but I can't seem to find the right one...

library(shiny)
library(shinythemes)
library(shinyWidgets)

ui <- fluidPage(
  theme=shinytheme("lumen"), # <- comment out this line to see the default styling.
  selectInput("sel1", "Select Input:", choices=c("A", "B", "C")),
  selectizeInput("sel2", "Selectize Input:", choices=c("D", "E", "F"), 
    multiple=T, 
    options = list(placeholder = 'Please select an option below', 
      onInitialize = I('function() { this.setValue(""); }'))),
  pickerInput("sel3", "Picker Input:", choices=c("G", "H", "I"), 
    options=list(title="Select below"), multiple=T, 
    choicesOpt = list(subtext=c("g","h","i")))
)

server <- function(input, output, session) {}

shinyApp(ui, server)

To be clear, I would like pickerInput to look like selectizeInput in the example provided. If you comment out the theme argument, you can see what the default styling looks like, so I think the key is something about the style class that pickerInput uses from the lumen bootswatch.

Any ideas are appreciated, as always.

phalteman
  • 3,442
  • 1
  • 29
  • 46

0 Answers0