bs4UserMenu | R Documentation |
dashboardUser to insert in the rightUi or leftUi slot of dashboardHeader.
This can be inserted in a dashboardUser
.
This can be used as a placeholder for dynamically-generated dashboardUser
.
bs4UserMenu(
...,
name = NULL,
image = NULL,
title = NULL,
subtitle = NULL,
footer = NULL,
status = NULL
)
dashboardUserItem(item, width)
userOutput(id, tag = shiny::tags$li)
renderUser(expr, env = parent.frame(), quoted = FALSE, outputArgs = list())
dashboardUser(
...,
name = NULL,
image = NULL,
title = NULL,
subtitle = NULL,
footer = NULL,
status = NULL
)
... |
Body content. Slot for dashboardUserItem. |
name |
User name. |
image |
User profile picture. |
title |
A title. |
subtitle |
A subtitle. |
footer |
Footer is any. |
status |
Ribbon status. Valid colors are defined as follows:
|
item |
HTML Tag. |
width |
Item width between 1 and 12. |
id |
Output variable name. |
tag |
A tag function, like |
expr |
An expression that returns a Shiny tag object, |
env |
The parent environment for the reactive expression. By default,
this is the calling environment, the same as when defining an ordinary
non-reactive expression. If |
quoted |
If it is |
outputArgs |
A list of arguments to be passed through to the implicit
call to |
renderUser
for the corresponding server side function
and examples.
userOutput
for the corresponding client side function
and examples.
if (interactive()) {
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(rightUi = userOutput("user")),
sidebar = dashboardSidebar(),
body = dashboardBody(),
title = "DashboardPage"
),
server = function(input, output) {
output$user <- renderUser({
dashboardUser(
name = "Divad Nojnarg",
image = "https://adminlte.io/themes/AdminLTE/dist/img/user2-160x160.jpg",
title = "shinydashboardPlus",
subtitle = "Author",
footer = p("The footer", class = "text-center"),
fluidRow(
dashboardUserItem(
width = 6,
"Item 1"
),
dashboardUserItem(
width = 6,
"Item 2"
)
)
)
})
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.