## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE ) ## ----setup-------------------------------------------------------------------- # library(bs4Dashkit) ## ----------------------------------------------------------------------------- # library(shiny) # library(bs4Dash) # library(bs4Dashkit) # # # 1. Build the brand object # ttl <- dash_titles("My Dashboard") # # ui <- bs4DashPage( # title = ttl$app_name, # browser tab title # header = bs4DashNavbar(title = ttl$brand), # sidebar = bs4DashSidebar(), # body = bs4DashBody( # use_bs4Dashkit_core(ttl) # 2. always the first call in body and called once # ) # ) # # server <- function(input, output, session) {} # shinyApp(ui, server) ## ----------------------------------------------------------------------------- # ttl <- dash_titles( # brand_text = "OLTCR Dashboards", # icon = "project-diagram", # Font Awesome icon name # weight = 700, # effect = "shimmer", # "none" | "glow" | "shimmer" | "emboss" # glow_color = "#2f6f8f", # size = "20px", # collapsed = "icon-text", # expanded = "icon-text", # collapsed_text = "DT", # shown when sidebar is collapsed # expanded_text = "OLTCR Dashboards", # brand_divider = TRUE # ) ## ----------------------------------------------------------------------------- # ttl <- dash_titles( # brand_text = "My App", # icon_img = "logo.png", # overrides `icon` # icon_shape = "rounded" # "circle" | "rounded" | "square" # ) ## ----------------------------------------------------------------------------- # body = bs4DashBody( # use_bs4Dashkit_core(ttl, preset = "professional"), # # ... rest of your content # ) ## ----------------------------------------------------------------------------- # use_bs4Dashkit_core(ttl, preset = "professional") # cool blue-grey (default) # use_bs4Dashkit_core(ttl, preset = "vibrant") # bolder accent colours # use_bs4Dashkit_core(ttl, preset = "minimal") # flat, low-contrast ## ----------------------------------------------------------------------------- # ttl <- dash_titles( # brand_text = "OLTCR Dashboards", # icon = "chart-line", # collapsed = "icon-only", # just the icon when narrow # expanded = "icon-text", # icon + label when wide # collapsed_text = "OL", # expanded_text = "OLTCR Dashboards" # ) ## ----------------------------------------------------------------------------- # body = bs4DashBody( # use_bs4Dashkit_core( # ttl, # preset = "professional", # topbar_h = 56, # collapsed_w = 4.2, # expanded_w = 250 # ) # # ... # ) ## ----------------------------------------------------------------------------- # options( # bs4Dashkit.sidebar.collapsed = "icon-only", # bs4Dashkit.sidebar.expanded = "icon-text", # bs4Dashkit.brand_divider = TRUE, # bs4Dashkit.accent = "#2f6f8f", # bs4Dashkit.theme_preset = "professional" # ) ## ----------------------------------------------------------------------------- # use_bs4Dashkit_core(ttl, preset = NULL) # uses option if set # use_bs4Dashkit_core(ttl, accent = NULL) # uses option if set