bs4Dash fonts parameters
bs4dash_font(
size_base = NULL,
size_lg = NULL,
size_sm = NULL,
size_xs = NULL,
size_xl = NULL,
weight_light = NULL,
weight_normal = NULL,
weight_bold = NULL,
family_sans_serif = NULL,
family_monospace = NULL,
family_base = NULL
)
Base size, this size is used to calculate other size. Must in rem
unit.
Large size.
Small size.
Extra small size.
Extra large size.
Light font weight.
Normal font weight.
Bold font weight.
Sans serif font family.
Monospace font family.
Base font family.
a list
that can be used in create_theme
.
# Change font size used in bs4Dash
bs4dash_font(
size_base = "1.5rem",
weight_bold = 900
)
#> $`font-size-base`
#> [1] "1.5rem"
#>
#> $`font-weight-bold`
#> [1] 900
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bs4dash_vars" "list"
if (interactive()) {
library(shiny)
library(bs4Dash)
ui <- bs4DashPage(
title = "bs4Dash Custom Colors",
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(
title = "bs4Dash Custom Colors",
skin = "light",
bs4SidebarMenu(
bs4SidebarMenuItem(
tabName = "tab1",
text = "UI components"
)
)
),
body = bs4DashBody(
use_theme(create_theme(
bs4dash_font(
size_base = "1.5rem",
weight_bold = 900
)
)),
bs4TabItems(
bs4TabItem(
tabName = "tab1",
tags$div(
tags$p(
paste(letters, collapse = "")
),
tags$p(
style = "font-weight: bold;",
paste(letters, collapse = "")
),
tags$p(
style = "font-style: italic;",
paste(letters, collapse = "")
)
),
tags$h1("First level title"),
tags$h2("Second level title"),
tags$h3("Third level title"),
tags$h4("Fourth level title"),
tags$h5("Fifth level title"),
tags$h6("Sixth level title")
)
)
)
)
server <- function(input, output) {
}
shinyApp(ui, server)
}