bs4Dash (version 2.3.3)

bs4UserMenu: Bootstrap 4 user profile.

Description

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.

Usage

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 )

Arguments

...

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:

  • primary: bs4Dash:::rd_color_tag("#007bff").

  • secondary: bs4Dash:::rd_color_tag("#6c757d").

  • info: bs4Dash:::rd_color_tag("#17a2b8").

  • success: bs4Dash:::rd_color_tag("#28a745").

  • warning: bs4Dash:::rd_color_tag("#ffc107").

  • danger: bs4Dash:::rd_color_tag("#dc3545").

  • gray-dark: bs4Dash:::rd_color_tag("#343a40").

  • gray: bs4Dash:::rd_color_tag("#adb5bd").

  • white: bs4Dash:::rd_color_tag("#fff").

  • indigo: bs4Dash:::rd_color_tag("#6610f2").

  • lightblue: bs4Dash:::rd_color_tag("#3c8dbc").

  • navy: bs4Dash:::rd_color_tag("#001f3f").

  • purple: bs4Dash:::rd_color_tag("#605ca8").

  • fuchsia: bs4Dash:::rd_color_tag("#f012be").

  • pink: bs4Dash:::rd_color_tag("#e83e8c").

  • maroon: bs4Dash:::rd_color_tag("#d81b60").

  • orange: bs4Dash:::rd_color_tag("#ff851b").

  • lime: bs4Dash:::rd_color_tag("#01ff70").

  • teal: bs4Dash:::rd_color_tag("#39cccc").

  • olive: bs4Dash:::rd_color_tag("#3d9970").

item

HTML Tag.

width

Item width between 1 and 12.

id

Output variable name.

tag

A tag function, like tags$li or tags$ul.

expr

An expression that returns a Shiny tag object, HTML(), or a list of such objects.

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 expr is a quosure and quoted is TRUE, then env is ignored.

quoted

If it is TRUE, then the quote()ed value of expr will be used when expr is evaluated. If expr is a quosure and you would like to use its expression as a value for expr, then you must set quoted to TRUE.

outputArgs

A list of arguments to be passed through to the implicit call to uiOutput() when renderUI is used in an interactive R Markdown document.

See Also

renderUser for the corresponding server side function and examples.

userOutput for the corresponding client side function and examples.

Examples

Run this code
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