Description Usage Arguments Value Examples
View source: R/vars-bootstrap.R
Those variables can be used to customize badge in Bootstrap and Bootswatch themes.
1 2 3 4 5 6 7 8 9 10 |
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
.
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 40 41 42 43 44 | 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)
}
|
$`badge-color`
[1] "firebrick"
$`badge-bg`
[1] "steelblue"
attr(,"class")
[1] "fresh_sass_vars" "bootstrap_vars" "list"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.