Those variables can be used to customize components padding and borders in Bootstrap and Bootswatch themes.
bs_vars_component(
padding_base_vertical = NULL,
padding_base_horizontal = NULL,
padding_large_vertical = NULL,
padding_large_horizontal = NULL,
padding_small_vertical = NULL,
padding_small_horizontal = NULL,
padding_xs_vertical = NULL,
padding_xs_horizontal = NULL,
line_height_large = NULL,
line_height_small = NULL,
border_radius_base = NULL,
border_radius_large = NULL,
border_radius_small = NULL,
component_active_color = NULL,
component_active_bg = NULL,
caret_width_base = NULL,
caret_width_large = NULL
)
Vertical base padding.
Horizontal base padding.
Vertical large padding.
Horizontal large padding.
Vertical small padding.
Horizontal small padding.
Vertical extra small padding.
Horizontal extra small padding.
Line height for large elements.
Line height for small elements.
Base border radius.
Large border radius.
Small border radius.
Color for active components.
Background color for active components.
Width for caret.
Widget for large caret.
a list
that can be used in create_theme
.
bs_vars_component(
padding_base_vertical = "5px",
padding_base_horizontal = "20px",
border_radius_base = 0,
component_active_bg = "#0B610B"
)
#> $`padding-base-vertical`
#> [1] "5px"
#>
#> $`padding-base-horizontal`
#> [1] "20px"
#>
#> $`border-radius-base`
#> [1] 0
#>
#> $`component-active-bg`
#> [1] "#0B610B"
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bootstrap_vars" "list"
if (interactive()) {
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
use_theme(
create_theme(
theme = "default",
bs_vars_component(
padding_base_vertical = "5px",
padding_base_horizontal = "20px",
border_radius_base = 0,
component_active_bg = "#0B610B"
),
output_file = NULL
)
),
tags$br(),
actionButton("id", "A button"),
wellPanel("A wellPanel"),
panel(
heading = "A panel",
status = "primary",
"Content"
),
navlistPanel(
"navlistPanel",
tabPanel("First"),
tabPanel("Second"),
tabPanel("Third")
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}