Those variables can be used to customize Bootstrap and Bootswatch themes.
bs_vars_global(
body_bg = NULL,
text_color = NULL,
link_color = NULL,
link_hover_color = NULL,
line_height_base = NULL,
grid_columns = NULL,
grid_gutter_width = NULL,
border_radius_base = NULL
)
Background color for the body.
Global text color on body.
Global textual link color.
Link hover color.
Unit-less `line-height` for use in components like buttons.
Number of columns in the grid, e.g. in shiny::fluidRow(shiny::column(...))
.
Padding between columns. Gets divided in half for the left and right.
Base border radius (rounds the corners of elements).
a list
that can be used in create_theme
.
# change background color
bs_vars_global(
body_bg = "#FAFAFA"
)
#> $`body-bg`
#> [1] "#FAFAFA"
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bootstrap_vars" "list"
if (interactive()) {
library(shiny)
ui <- fluidPage(
use_theme(
create_theme(
theme = "default",
bs_vars_global(
body_bg = "#F5A9E1",
text_color = "#FFF",
grid_columns = 16
),
output_file = NULL
)
),
tags$h1("My custom app!"),
tags$h3("With plenty of columns!"),
fluidRow(
column(
width = 1, "Column 1"
),
column(
width = 1, "Column 2"
),
column(
width = 1, "Column 3"
),
column(
width = 1, "Column 4"
),
column(
width = 1, "Column 5"
),
column(
width = 1, "Column 6"
),
column(
width = 1, "Column 7"
),
column(
width = 1, "Column 8"
),
column(
width = 1, "Column 9"
),
column(
width = 1, "Column 10"
),
column(
width = 1, "Column 11"
),
column(
width = 1, "Column 12"
),
column(
width = 1, "Column 13"
),
column(
width = 1, "Column 14"
),
column(
width = 1, "Column 15"
),
column(
width = 1, "Column 16"
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}