dashboardUser: Create a dashboard user profile.

Description Usage Arguments See Also Examples

View source: R/dashboardHeaderPlus.R

Description

Create a dashboard user profile.

Usage

1
2
3
4
5
6
7
8
dashboardUser(
  ...,
  name = NULL,
  src = NULL,
  title = NULL,
  subtitle = NULL,
  footer = NULL
)

Arguments

...

Body content. Slot for dashboardUserItem.

name

User name.

src

User profile picture.

title

A title.

subtitle

A subtitle.

footer

Footer is any.

See Also

userOutput and renderUser for dynamically-generating dashboardUser.

Examples

 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
43
44
45
46
47
48
if (interactive()) {
 library(shiny)
 library(shinyWidgets)
 library(shinydashboard)
 library(shinydashboardPlus)
 
 shinyApp(
  ui = dashboardPagePlus(
    header = dashboardHeaderPlus(
      enable_rightsidebar = TRUE,
      rightSidebarIcon = "gears",
      left_menu = NULL,
      userOutput("user")
    ),
    sidebar = dashboardSidebar(),
    body = dashboardBody(),
    rightsidebar = rightSidebar(),
    title = "DashboardPage"
  ),
  server = function(input, output) {
   output$user <- renderUser({
    dashboardUser(
       name = "Divad Nojnarg", 
       src = "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,
         socialButton(
          url = "https://dropbox.com",
          type = "dropbox"
         )
        ),
        dashboardUserItem(
         width = 6,
         socialButton(
          url = "https://github.com",
          type = "github"
         )
        )
       )
      )
   })
  }
 )
}

dsciencelabs/shinydashboardPlus documentation built on Dec. 20, 2021, 2:10 a.m.