bs4DashControlbar | R Documentation |
Build an adminLTE3 dashboard right sidebar
bs4DashControlbar(
...,
id = NULL,
disable = FALSE,
width = 250,
collapsed = TRUE,
overlay = TRUE,
skin = NULL,
pinned = NULL
)
controlbarMenu(
...,
id = NULL,
selected = NULL,
type = c("tabs", "pills", "hidden"),
vertical = FALSE,
side = "left",
.list = NULL
)
controlbarItem(title, ..., value = title, icon = NULL)
updateControlbarMenu(
session = shiny::getDefaultReactiveDomain(),
inputId,
selected = NULL
)
updateControlbar(id, session = shiny::getDefaultReactiveDomain())
dashboardControlbar(
...,
id = NULL,
disable = FALSE,
width = 250,
collapsed = TRUE,
overlay = TRUE,
skin = NULL,
pinned = NULL
)
... |
Any UI element. |
id |
Controlbar id. |
disable |
If |
width |
Controlbar width. This must either be a number which specifies the width in pixels, or a string that specifies the width in CSS units. 250 px by default. |
collapsed |
Whether the control bar on the right side is collapsed or not at start. TRUE by default. |
overlay |
Whether the sidebar covers the content when expanded. Default to TRUE. |
skin |
Controlbar skin. "dark" or "light". Matches the dashboardPage dark parameter value. |
pinned |
Whether to block the controlbar state (TRUE or FALSE). Default to NULL. |
selected |
The |
type |
|
vertical |
Whether to displays tabs vertically. Default to FALSE. |
side |
Tabs side: |
.list |
In case of programmatically generated items. See example. |
title |
Display title for tab |
value |
The value that should be sent when |
icon |
Optional icon to appear on the tab. This attribute is only
valid when using a |
session |
Shiny session object. |
inputId |
The id of the |
David Granjon, dgranjon@ymail.com
if (interactive()) {
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(),
body = dashboardBody(
actionButton(inputId = "controlbarToggle", label = "Toggle Controlbar")
),
controlbar = dashboardControlbar(
id = "controlbar",
collapsed = FALSE,
overlay = TRUE
),
title = "updateControlbar"
),
server = function(input, output, session) {
observeEvent(input$controlbar, {
if (input$controlbar) {
showModal(modalDialog(
title = "Alert",
"The controlbar is opened.",
easyClose = TRUE,
footer = NULL
))
}
})
observeEvent(input$controlbarToggle, {
updateControlbar(id = "controlbar", session = session)
})
observe({
print(input$controlbar)
})
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.