dreamRs / shinyWidgets

shinyWidgets : Extend widgets available in shiny
https://dreamrs.github.io/shinyWidgets/
GNU General Public License v3.0
832 stars 153 forks source link

pickerInput and bslib themes #475

Closed hdoran closed 2 months ago

hdoran commented 2 years ago

Not sure this is a bug, but posted this on SO and wondering if anyone here might see a solution to get my pickerInput to have a cleaner look in the UI when using bslib theme litera?

https://stackoverflow.com/questions/71194539/clean-up-select-form-in-shiny-application-with-shinywidgets-and-bslib

obsaditelnost commented 2 years ago

pickerInput seems to add a "<div class="form-control">" around the button. However the "form-control"-class in bootstrap is used for form controls instead of containers. For containers there are the "form-group" or "input-group" classes. Hence the white background as it's expected for all input controls (for this theme).

To get rid of the white background, you could add a custom style in fluidPage:

tags$head(tags$style(HTML("div.form-control {background-color: transparent;}"))),

The shiny::fileInput has nothing to do with shinyWidgets: it's messed up because of bslib. You can build your own file upload though