bs_vars_badge: Bootstrap CSS badge variables

Description Usage Arguments Value Examples

View source: R/vars-bootstrap.R

Description

Those variables can be used to customize badge in Bootstrap and Bootswatch themes.

Usage

1
2
3
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)

Arguments

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. : "bold".

line_height

Line height.

border_radius

Border radius.

Value

a list that can be used in create_theme.

Examples

 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)

}

fresh documentation built on Oct. 30, 2019, 11:38 a.m.