infoBox2: Create an info box for the main body of a dashboard.

Description Usage Arguments See Also Examples

Description

An info box displays a large icon on the left side, and a title, value (usually a number), and an optional smaller subtitle on the right side. Info boxes are meant to be placed in the main body of a dashboard.

Usage

1
2
3
infoBox2(title, value = NULL, subtitle = NULL,
  icon = shiny::icon("bar-chart"), color = "aqua", width = 4,
  href = NULL, fill = FALSE, prog = NULL, prog_width = "70%")

Arguments

title

Title text.

value

The value to display in the box. Usually a number or short text.

subtitle

Subtitle text (optional).

icon

An icon tag, created by icon.

color

A color for the box. Valid colors are listed in validColors.

href

An optional URL to link to.

fill

If FALSE (the default), use a white background for the content, and the color argument for the background of the icon. If TRUE, use the color argument for the background of the content; the icon will use the same color with a slightly darkened background.

prog

Process text (optional).

prog_width

The value of process.

See Also

Other boxes: box2

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
## Only run this example in interactive R sessions
if (interactive()) {
library(shiny)
library(shinydashboard)

server <- function(input, output) {
  output$infoBox_process <- renderInfoBox({
    infoBox2(
      'Info', 'some text', width = 6,
      fill = TRUE, prog = "Process", prog_width = '70%'
    )
  })

}

body <- dashboardBody(
  infoBoxOutput(outputId = 'infoBox_process')
)

ui <- dashboardPage(
  dashboardHeader(disable = TRUE),
  dashboardSidebar(disable = TRUE),
  body
)

shinyApp(ui, server)
}

jeevanyue/ShinyFuncs documentation built on May 24, 2019, 7:14 a.m.