## ----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", icon = icon("cloud")) # # 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 = "My Dashboard", # icon = icon("cloud") # ) ## ----------------------------------------------------------------------------- # ttl <- dash_titles( # brand_text = "OLTCR Dashboards", # icon = icon("project-diagram"), # weight = 700, # effect = "shimmer", # "none" | "glow" | "shimmer" | "emboss" # glow_color = "#2f6f8f", # size = "20px", # collapsed = "icon-text", # expanded = "icon-text", # collapsed_text = "OLT", # shown when sidebar is collapsed # expanded_text = "OLTCR Dashboards", # brand_divider = TRUE # ) ## ----------------------------------------------------------------------------- # ttl <- dash_titles( # brand_text = NULL, # app_name = "Icon Lab", # icon = icon("cloud"), # collapsed = "icon-only", # expanded = "icon-only" # ) ## ----------------------------------------------------------------------------- # 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 = "modern") # brighter accent colours # use_bs4Dashkit_core(ttl, preset = "dark-lite") # dark surfaces and lighter text # bs4dashkit_theme_presets() # list built-in presets ## ----------------------------------------------------------------------------- # app <- bs4dashkit_example_app() ## ----------------------------------------------------------------------------- # app <- bs4dashkit_demo_app() ## ----------------------------------------------------------------------------- # shiny::runApp(system.file("examples", "real-shiny-app", package = "bs4Dashkit")) ## ----------------------------------------------------------------------------- # shiny::runApp(system.file("examples", "test-all", package = "bs4Dashkit")) ## ----------------------------------------------------------------------------- # ttl <- dash_titles( # brand_text = "OLTCR Dashboards", # icon = icon("chart-line"), # collapsed = "icon-only", # just the icon when narrow # expanded = "icon-text", # icon + label when wide # collapsed_text = "OLT", # expanded_text = "OLTCR Dashboards" # optional; brand_text is the default # ) ## ----------------------------------------------------------------------------- # 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