Those variables can be used to customize states colors (used for alerts or panels) in Bootstrap and Bootswatch themes.
bs_vars_state(
success_text = NULL,
success_bg = NULL,
success_border = NULL,
info_text = NULL,
info_bg = NULL,
info_border = NULL,
warning_text = NULL,
warning_bg = NULL,
warning_border = NULL,
danger_text = NULL,
danger_bg = NULL,
danger_border = NULL
)
Success text color.
Success background color.
Success border color.
Info text color.
Info background color.
Info border color.
Warning text color.
Warning background color.
Warning border color.
Danger text color.
Danger background color.
Danger border color.
a list
that can be used in create_theme
.
See default parameters for Bootstrap: https://getbootstrap.com/docs/3.4/customize/.
# Panels & alerts colors
bs_vars_state(
success_text = "#FFF",
success_bg = "#238B45",
success_border = "#00441B"
)
#> $`state-success-text`
#> [1] "#FFF"
#>
#> $`state-success-bg`
#> [1] "#238B45"
#>
#> $`state-success-border`
#> [1] "#00441B"
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bootstrap_vars" "list"
if (interactive()) {
library(shiny)
library(shinyWidgets)
library(fresh)
ui <- fluidPage(
use_theme(create_theme(
theme = "default",
bs_vars_state(
success_text = "#FFF",
success_bg = "#238B45",
success_border = "#00441B"
)
)),
tags$h1("State variables"),
fluidRow(
column(
width = 6,
tags$div(
class = "alert alert-success",
tags$b("Alert!"), "this is an alert !"
)
),
column(
width = 6,
panel(
status = "success",
"This is a panel"
)
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}