| bs_vars_badge | R Documentation |
Those variables can be used to customize badge in Bootstrap and Bootswatch themes.
bs_vars_badge( color = NULL, bg = NULL, link_hover_color = NULL, active_color = NULL, active_bg = NULL, font_weight = NULL, line_height = NULL, border_radius = NULL )
color |
Text color. |
bg |
Background color. |
link_hover_color |
Linked badge text color on hover. |
active_color |
Badge text color in active nav link. |
active_bg |
Badge background color in active nav link. |
font_weight |
Font weight, e.g. : |
line_height |
Line height. |
border_radius |
Border radius. |
a list that can be used in create_theme.
bs_vars_badge(
color = "firebrick",
bg = "steelblue"
)
if (interactive()) {
library(shiny)
ui <- fluidPage(
use_theme(create_theme(
theme = "default",
bs_vars_badge(
color = "yellow",
bg = "firebrick",
line_height = 1.2
)
)),
tags$h1("Badges"),
tags$span(class = "badge", "Simple badge"),
tags$br(),
tags$ul(
class = "list-group",
tags$li(
class = "list-group-item",
"Badge in list group",
tags$span(class = "badge", "badge")
),
tags$li(
class = "list-group-item",
"An other item",
tags$span(class = "badge", "other")
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}