Description Usage Arguments Author(s) Examples
Build an adminLTE3 dashboard right sidebar
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 32 33 34 35 36 37 38 39 40 41 42 | bs4DashControlbar(
...,
id = NULL,
disable = FALSE,
width = 250,
collapsed = TRUE,
overlay = TRUE,
skin = "dark",
pinned = NULL
)
controlbarMenu(
...,
id = NULL,
selected = NULL,
type = c("tabs", "pills"),
position = NULL,
vertical = FALSE,
side = "left",
.list = NULL
)
controlbarItem(title, ..., value = title, icon = NULL)
updateControlbarMenu(
session = getDefaultReactiveDomain(),
inputId,
selected = NULL
)
updateControlbar(id, session = shiny::getDefaultReactiveDomain())
dashboardControlbar(
...,
id = NULL,
disable = FALSE,
width = 250,
collapsed = TRUE,
overlay = TRUE,
skin = "dark",
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". |
pinned |
Whether to block the controlbar state (TRUE or FALSE). Default to NULL. |
selected |
The |
type |
|
position |
This argument is deprecated; it has been discontinued in Bootstrap 3. |
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
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 32 33 34 35 36 37 38 39 40 | 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.