Description Usage Arguments Value Note Examples
View source: R/vars-bootstrap.R
Those variables can be used to customize inputs in Bootstrap and Bootswatch themes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | bs_vars_alert(
padding = NULL,
border_radius = NULL,
link_font_weight = NULL,
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
)
|
padding |
Padding for alerts. |
border_radius |
Border radius (rounded corners) |
link_font_weight |
Font weight for links in alerts. |
success_text |
Success text color. |
success_bg |
Success background color. |
success_border |
Success border color. |
info_text |
Info text color. |
info_bg |
Info background color. |
info_border |
Info border color. |
warning_text |
Warning text color. |
warning_bg |
Warning background color. |
warning_border |
Warning border color. |
danger_text |
Danger text color. |
danger_bg |
Danger background color. |
danger_border |
Danger border color. |
a list
that can be used in create_theme
.
See default parameters for Bootstrap: https://getbootstrap.com/docs/3.4/customize/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | bs_vars_alert(
border_radius = "10px", # increase border radius,
success_bg = "#c9d175" # change color for success alerts
)
if (interactive()) {
library(shiny)
ui <- fluidPage(
use_theme(
create_theme(
theme = "default",
bs_vars_alert(
border_radius = "15px",
success_bg = "forestgreen",
success_text = "#FFF",
danger_bg = "firebrick",
danger_text = "#FFF"
),
output_file = NULL
)
),
tags$br(),
tags$div(
class = "alert alert-success",
"This is an alert !"
),
tags$div(
class = "alert alert-danger",
"This is an other alert !"
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.