Description Usage Arguments Value Functions Examples
View source: R/semantic_dashboard.R
Create a pushable sidebar of a dashboard with menu items and other additional UI elements.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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. |
side |
Placement of the sidebar. One of |
size |
Size of the sidebar. One of |
color |
Color of the sidebar / text / icons (depending on the value of 'inverted' parameter. \
One of |
inverted |
If FALSE sidebar will be white and text will be colored. \
If TRUE text will be white and background will be colored. Default is |
closable |
If |
pushable |
If |
center |
Should label and icon be centerd on menu items. Default to |
visible |
Should sidebar be visible on start. Default to |
disable |
If |
overlay |
If |
dim_page |
If |
class |
CSS class to be applied to the container of |
A sidebar that can be passed to dashboardPage
dashboardSidebar
: Create a sidebar of a dashboard (alias for dashboard_sidebar
for compatibility with shinydashboard
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.