bs4Dash sidebar skins light/dark
bs4dash_sidebar_light(
bg = NULL,
hover_bg = NULL,
color = NULL,
hover_color = NULL,
active_color = NULL,
submenu_bg = NULL,
submenu_color = NULL,
submenu_hover_color = NULL,
submenu_hover_bg = NULL,
submenu_active_color = NULL,
submenu_active_bg = NULL,
header_color = NULL
)
bs4dash_sidebar_dark(
bg = NULL,
hover_bg = NULL,
color = NULL,
hover_color = NULL,
active_color = NULL,
submenu_bg = NULL,
submenu_color = NULL,
submenu_hover_color = NULL,
submenu_hover_bg = NULL,
submenu_active_color = NULL,
submenu_active_bg = NULL,
header_color = NULL
)
Background color.
Hover background color.
Color.
Hover color.
Active color.
Submenu background color.
Submenu color.
Submenu hover color.
Submenu hover background color.
Submenu active color.
Submenu active background color.
Header color.
a list
that can be used in create_theme
.
# Change colors used in bs4Dash
bs4dash_sidebar_light(
bg = "#D7DF01",
color = "#FF0000",
active_color = "#00FF00",
submenu_bg = "#00FFFF"
)
#> $`sidebar-light-bg`
#> [1] "#D7DF01"
#>
#> $`sidebar-light-color`
#> [1] "#FF0000"
#>
#> $`sidebar-light-active-color`
#> [1] "#00FF00"
#>
#> $`sidebar-light-submenu-bg`
#> [1] "#00FFFF"
#>
#> attr(,"class")
#> [1] "fresh_sass_vars" "bs4dash_vars" "list"
if (interactive()) {
library(shiny)
library(bs4Dash)
ui <- bs4DashPage(
title = "bs4Dash Custom Sidebar",
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(
title = "bs4Dash Custom Sidebar",
skin = "light",
bs4SidebarHeader("Sidebar Title"),
bs4SidebarMenu(
bs4SidebarMenuItem(
tabName = "menu1",
text = "Menu 1",
icon = "home"
),
bs4SidebarMenuItem(
tabName = "menu2",
text = "Menu 2",
icon = "th"
),
bs4SidebarMenuItem(
text = "Item List",
icon = "bars",
startExpanded = TRUE,
bs4SidebarMenuSubItem(
text = "Item 1",
tabName = "item1",
icon = "circle-thin"
),
bs4SidebarMenuSubItem(
text = "Item 2",
tabName = "item2",
icon = "circle-thin"
)
)
)
),
body = bs4DashBody(
use_theme(create_theme(
bs4dash_sidebar_light(
bg = "#D7DF01",
color = "#FF0000",
active_color = "#00FF00",
submenu_bg = "#00FFFF"
)
))
)
)
server <- function(input, output) {
}
shinyApp(ui, server)
}