Those variables can be used to customize the sidebar in shinydashboard.
adminlte_sidebar(
width = NULL,
dark_bg = NULL,
dark_hover_bg = NULL,
dark_color = NULL,
dark_hover_color = NULL,
dark_submenu_bg = NULL,
dark_submenu_color = NULL,
dark_submenu_hover_color = NULL,
light_bg = NULL,
light_hover_bg = NULL,
light_color = NULL,
light_hover_color = NULL,
light_submenu_bg = NULL,
light_submenu_color = NULL,
light_submenu_hover_color = NULL
)
Side bar width, default to 230px
.
Background color (dark mode).
Background hover color (dark mode).
Text color (dark mode).
Text hover color (dark mode).
Background sub-menu color (dark mode).
Text sub-menu color (dark mode).
Text sub-menu hover color (dark mode).
Background color (light mode).
Background hover color (light mode).
Text color (light mode).
Text hover color (light mode).
Background sub-menu color (light mode).
Text sub-menu color (light mode).
Text sub-menu hover color (light mode).
a list
that can be used in create_theme
.
if (interactive()) {
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
header = dashboardHeader(title = "My dashboard"),
sidebar = dashboardSidebar(
sidebarMenu(
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Widgets", icon = icon("th"), tabName = "widgets", badgeLabel = "new",
badgeColor = "green"),
menuItem("Charts", icon = icon("bar-chart-o"),
menuSubItem("Sub-item 1", tabName = "subitem1"),
menuSubItem("Sub-item 2", tabName = "subitem2")
)
)
),
body = dashboardBody(
use_theme(create_theme(
adminlte_sidebar(
dark_bg = "#F5A9A9",
dark_hover_bg = "#8A0808"
)
))
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}