bs4dash_layout: bs4Dash layout options

Description Usage Arguments Value Examples

View source: R/vars-bs4dash.R

Description

bs4Dash layout options

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
bs4dash_layout(
  font_size_root = NULL,
  sidebar_width = NULL,
  sidebar_padding_x = NULL,
  sidebar_padding_y = NULL,
  sidebar_mini_width = NULL,
  control_sidebar_width = NULL,
  boxed_layout_max_width = NULL,
  screen_header_collapse = NULL,
  main_bg = NULL,
  content_padding_x = NULL,
  content_padding_y = NULL
)

Arguments

font_size_root

Font size root.

sidebar_width

Sidebar width.

sidebar_padding_x

Sidebar horizontal padding.

sidebar_padding_y

Sidebar vertical padding.

sidebar_mini_width

Width for mini sidebar.

control_sidebar_width

Control sidebar width (the one on the right).

boxed_layout_max_width

Max width used in boxed layout.

screen_header_collapse

When to show the smaller logo.

main_bg

Main background color.

content_padding_x

Main content horizontal padding.

content_padding_y

Main content vertical padding.

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
45
46
47
# Sidebar width
bs4dash_layout(
  sidebar_width = "400px"
)

if (interactive()) {

  library(shiny)
  library(bs4Dash)

  ui <- bs4DashPage(
    title = "bs4Dash big sidebar",
    navbar = bs4DashNavbar(),
    sidebar = bs4DashSidebar(
      title = "bs4Dash big sidebar",
      skin = "light",
      bs4SidebarMenu(
        bs4SidebarMenuItem(
          tabName = "tab1",
          text = "UI components"
        )
      )
    ),
    body = bs4DashBody(

      use_theme(create_theme(
        bs4dash_layout(
          sidebar_width = "600px"
        )
      )),

      bs4TabItems(
        bs4TabItem(
          tabName = "tab1",
          "Content tab 1"
        )
      )
    )
  )

  server <- function(input, output) {

  }

  shinyApp(ui, server)

}

fresh documentation built on July 2, 2020, 1:59 a.m.