Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't custom the `size` argument of `shinyBS::bsButton`

Tags:

css

r

shiny

With shinyBS::bsButton() it is possible to have a style = "default" button and a custom size e.g. :

bsButton("but1", style = "default", label = "small button with default style", size = "extra-small")

I have a shiny dashboard and for an unknown reason customizing the size argument of bsButton() no longer leads to size changes within the UI.

Any idea what I did within my application (too complex to be paste) leading to such a behavior?

Loaded packages are:

  library(plyr) 
  require(dplyr)
  library(shiny)
  library(shinyBS)
  library(shinyWidgets) 
  library(shinyjs) 
  library(shinydashboard)
  library(shinydashboardPlus)
  library(dashboardthemes)

I do have shiny::includeCSS("www/style.css") in my dashboardBody() element which I commented to see if it came from here, but no (it stores {font-family: Century Gothic, sans-serif;} for *, input, label and h1-4). I also do have some tags$style() but still, even all disable that does not fix the issue.

I am really eager to understand what I did to modify the styling of those buttons.

[edit] I noticed that I have the same type of problem with argument type of showNotification() as well, where whatever type I give the notification is always the gray default one.

like image 475
yeahman269 Avatar asked Dec 13 '25 14:12

yeahman269


1 Answers

Found it! It was due to the following code:

      dashboardthemes::shinyDashboardThemes(theme = "grey_light"),

which embeds some CSS behind and somehow must prevent size change to the button "default" type.

Now I just wonder how to workaround that...

like image 168
yeahman269 Avatar answered Dec 16 '25 13:12

yeahman269



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!