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"
)
)
)
})
}
)
}
Run the code above in your browser using DataLab