
Last chance! 50% off unlimited learning
Sale ends in
Create a pushable sidebar of a dashboard with menu items and other additional UI elements.
dashboard_sidebar(
...,
side = "left",
size = "thin",
color = "",
inverted = FALSE,
closable = FALSE,
pushable = TRUE,
center = FALSE,
visible = TRUE,
disable = FALSE,
overlay = FALSE,
dim_page = FALSE,
class = ""
)dashboardSidebar(
...,
side = "left",
size = "thin",
color = "",
inverted = FALSE,
closable = FALSE,
pushable = TRUE,
center = FALSE,
visible = TRUE,
disable = FALSE,
overlay = FALSE,
dim_page = FALSE,
class = ""
)
UI elements to include within the sidebar.
Placement of the sidebar. One of c("left", "right", "top", "bottom")
Size of the sidebar. One of c("", "thin", "very thin", "wide", "very wide")
Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \
One of c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")
If FALSE sidebar will be white and text will be colored. \
If TRUE text will be white and background will be colored. Default is FALSE
.
If TRUE
allow close sidebar by clicking in the body. Default to FALSE
If TRUE
the menu button is active. Default to TRUE
Should label and icon be centerd on menu items. Default to FALSE
Should sidebar be visible on start. Default to TRUE
If TRUE
, don't display the sidebar.
If TRUE
, opened sidebar will cover the tab content. Otherwise it is displayed next to the content.
Relevant only for sidebar positioned on left or right. Default to FALSE
If TRUE
, page content will be darkened when sidebr is open. Default to FALSE
CSS class to be applied to the container of dashboardSidebar
.
A sidebar that can be passed to dashboardPage
dashboardSidebar
: Create a sidebar of a dashboard (alias for dashboard_sidebar
for compatibility with shinydashboard
)
# NOT RUN {
if(interactive()){
library(shiny)
library(semantic.dashboard)
ui <- dashboardPage(
dashboardHeader(color = "blue"),
dashboardSidebar(side = "left", size = "thin", color = "teal",
sidebarMenu(
menuItem(tabName = "tab1", "Tab 1"),
menuItem(tabName = "tab2", "Tab 2"))),
dashboardBody(tabItems(
tabItem(tabName = "tab1", p("Tab 1")),
tabItem(tabName = "tab2", p("Tab 2"))))
)
server <- function(input, output) {
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab