bs_vars_tabs: Bootstrap CSS tabs variables

Description Usage Arguments Value Examples

View source: R/vars-bootstrap.R

Description

Those variables can be used to customize pills (e.g. shiny:tabsetPanel in Bootstrap and Bootswatch themes.

Usage

1
2
3
4
5
bs_vars_tabs(border_color = NULL, link_hover_border_color = NULL,
  active_link_hover_bg = NULL, active_link_hover_color = NULL,
  active_link_hover_border_color = NULL,
  justified_link_border_color = NULL,
  justified_active_link_border_color = NULL)

Arguments

border_color

Border color.

link_hover_border_color

Link hover color.

active_link_hover_bg

Active link hover background color.

active_link_hover_color

Active link hover color.

active_link_hover_border_color

Active link hover border color.

justified_link_border_color

Justified link border color.

justified_active_link_border_color

Justified active link border color.

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_tabs(
  border_color = "#FF0000", # red
  link_hover_border_color = "#FFFF00", # yellow
  active_link_hover_bg = "#FF00FF", # pink
  active_link_hover_color = "#FFF" # white
)

if (interactive()) {
  library(shiny)
  library(fresh)

  ui <- fluidPage(
    use_theme(create_theme(
      theme = "default",
      bs_vars_global(
        link_color = "#00FF00" #green
      ),
      bs_vars_tabs(
        border_color = "#FF0000", # red
        link_hover_border_color = "#FFFF00", # yellow
        active_link_hover_bg = "#FF00FF", # pink
        active_link_hover_color = "#FFF" # white
      )
    )),
    tags$h1("Tabs panel"),

    sidebarLayout(
      sidebarPanel(),
      mainPanel(
        tabsetPanel(
          tabPanel("Plot", plotOutput("plot")),
          tabPanel("Summary", verbatimTextOutput("summary")),
          tabPanel("Table", tableOutput("table"))
        )
      )
    )
  )

  server <- function(input, output, session) {

  }

  shinyApp(ui, server)
}

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