Those variables can be used to customize navigation bar component (e.g. shiny::navbarPage) in Bootstrap and Bootswatch themes.

bs_vars_navbar(
  height = NULL,
  margin_bottom = NULL,
  border_radius = NULL,
  padding_horizontal = NULL,
  padding_vertical = NULL,
  collapse_max_height = NULL,
  default_color = NULL,
  default_bg = NULL,
  default_border = NULL,
  default_link_color = NULL,
  default_link_active_color = NULL,
  default_link_active_bg = NULL,
  default_link_hover_color = NULL,
  default_link_hover_bg = NULL,
  inverse_color = NULL,
  inverse_bg = NULL,
  inverse_border = NULL,
  inverse_link_color = NULL,
  inverse_link_active_color = NULL,
  inverse_link_active_bg = NULL,
  inverse_link_hover_color = NULL,
  inverse_link_hover_bg = NULL
)

Arguments

height

Height of the navbar, e.g. "50px" (the default in Bootstrap).

margin_bottom

Bottom margin of navbar.

border_radius

Radius border (rounded corner).

padding_horizontal

Horizontal padding.

padding_vertical

= Vertical padding.

collapse_max_height

Max height when collapsed.

default_color

Color of text in the navbar.

default_bg

Background color of the navbar.

default_border

Border color of the navbar.

default_link_color

Link color.

default_link_active_color

Color for active link (selected tab).

default_link_active_bg

Background color for active link (selected tab).

default_link_hover_color

Color of links when hovered.

default_link_hover_bg

Background color of links when hovered.

inverse_color

Color of text for inverted navbar.

inverse_bg

Background color for inverted navbar.

inverse_border

Border color for inverted navbar.

inverse_link_color

Link color for inverted navbar.

inverse_link_active_color

Color for active link (selected tab) for inverted navbar.

inverse_link_active_bg

Background color for active link (selected tab) for inverted navbar.

inverse_link_hover_color

Color of links when hovered for inverted navbar.

inverse_link_hover_bg

Background color of links when hovered for inverted navbar.

Value

a list that can be used in create_theme.

Note

See default parameters for Bootstrap: https://getbootstrap.com/docs/3.4/customize/.

Examples

# Change background color of the navbar
bs_vars_navbar(
  default_bg = "#75b8d1",
  default_color = "#FFFFFF",
  default_link_color = "#FFFFFF",
  default_link_active_color = "#FFFFFF"
)
#> $`navbar-default-color`
#> [1] "#FFFFFF"
#> 
#> $`navbar-default-bg`
#> [1] "#75b8d1"
#> 
#> $`navbar-default-link-color`
#> [1] "#FFFFFF"
#> 
#> $`navbar-default-link-active-color`
#> [1] "#FFFFFF"
#> 
#> attr(,"class")
#> [1] "fresh_sass_vars" "bootstrap_vars"  "list"           

if (interactive()) {
  library(shiny)

  ui <- navbarPage(
    title = "Custom navbar",
    header = use_theme(
      create_theme(
        theme = "default",
        bs_vars_navbar(
          default_bg = "#75b8d1",
          default_color = "#FFFFFF",
          default_link_color = "#FFFFFF",
          default_link_active_color = "#75b8d1",
          default_link_active_bg = "#FFFFFF",
          default_link_hover_color = "firebrick"

        ),
        output_file = NULL
      )
    ),
    tabPanel("Tab 1"),
    tabPanel("Tab 2")
  )

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

  }

  shinyApp(ui, server)
}