Those variables can be used to customize
buttons (e.g. shiny::actionButton
)
in Bootstrap and Bootswatch themes.
bs_vars_button( font_weight = NULL, default_color = NULL, default_bg = NULL, default_border = NULL, primary_color = NULL, primary_bg = NULL, primary_border = NULL, success_color = NULL, success_bg = NULL, success_border = NULL, info_color = NULL, info_bg = NULL, info_border = NULL, warning_color = NULL, warning_bg = NULL, warning_border = NULL, danger_color = NULL, danger_bg = NULL, danger_border = NULL, link_disabled_color = NULL, border_radius_base = NULL, border_radius_large = NULL, border_radius_small = NULL )
font_weight | Text font weight. |
---|---|
default_color | Text color for default buttons. |
default_bg | Background color for default buttons. |
default_border | Border color for default buttons. |
primary_color | Text color for primary buttons. |
primary_bg | Background color for primary buttons. |
primary_border | Border color for primary buttons. |
success_color | Text color for success buttons. |
success_bg | Background color for success buttons. |
success_border | Border color for success buttons. |
info_color | Text color for info buttons. |
info_bg | Background color for info buttons. |
info_border | Border color for info buttons. |
warning_color | Text color for warning buttons. |
warning_bg | Background color for warning buttons. |
warning_border | Border color for warning buttons. |
danger_color | Text color for danger buttons. |
danger_bg | Background color for danger buttons. |
danger_border | Border color for danger buttons. |
link_disabled_color | Color for disabled link. |
border_radius_base | Button rounded corner. |
border_radius_large | Large button rounded corner. |
border_radius_small | Small button rounded corner. |
a list
that can be used in create_theme
.
bs_vars_button( default_color = "#FFF", default_bg = "#112446", default_border = "#FFF", primary_color = "#112446", primary_bg = "#FFF", primary_border = "#112446", border_radius_base = 0 )#> $`btn-default-color` #> [1] "#FFF" #> #> $`btn-default-bg` #> [1] "#112446" #> #> $`btn-default-border` #> [1] "#FFF" #> #> $`btn-primary-color` #> [1] "#112446" #> #> $`btn-primary-bg` #> [1] "#FFF" #> #> $`btn-primary-border` #> [1] "#112446" #> #> $`btn-border-radius-base` #> [1] 0 #> #> attr(,"class") #> [1] "fresh_sass_vars" "bootstrap_vars" "list"if (interactive()) { library(shiny) ui <- fluidPage( use_theme( create_theme( theme = "default", bs_vars_button( default_color = "#FFF", default_bg = "#112446", default_border = "#FFF", primary_color = "#112446", primary_bg = "#FFF", primary_border = "#112446", border_radius_base = 0 ), output_file = NULL ) ), tags$h1("Custom buttons"), actionButton("button1", "This is a default button"), actionButton( "button2", "This is a primary button", class = "btn-primary" ) ) server <- function(input, output, session) { } shinyApp(ui, server) }