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
)
Text font weight.
Text color for default buttons.
Background color for default buttons.
Border color for default buttons.
Text color for primary buttons.
Background color for primary buttons.
Border color for primary buttons.
Text color for success buttons.
Background color for success buttons.
Border color for success buttons.
Text color for info buttons.
Background color for info buttons.
Border color for info buttons.
Text color for warning buttons.
Background color for warning buttons.
Border color for warning buttons.
Text color for danger buttons.
Background color for danger buttons.
Border color for danger buttons.
Color for disabled link.
Button rounded corner.
Large button rounded corner.
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)
}