valueBox: Create a value box component for a dashboard.

Description Usage Arguments Details Examples

View source: R/valuebox.R

Description

A value box displays a value (usually a number) in large text, with a smaller caption beneath, and a large icon on the right side.

Usage

1
valueBox(value, caption = NULL, icon = NULL, color = NULL, href = NULL)

Arguments

value

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

caption

The caption to display beneath the value.

icon

An icon for the box (e.g. "fa-comments")

color

Background color for the box. This can be one of the built-in background colors ("primary", "info", "success", "warning", "danger") or any valid CSS color value.

href

An optional URL to link to. Note that this can be an anchor of another dashboard page (e.g. "#details").

Details

See the flexdashboard website for additional documentation: http://rmarkdown.rstudio.com/flexdashboard/using.html#value_boxes

Examples

1
2
3
4
5
library(flexdashboard)

valueBox(42, caption = "Errors", icon="fa-thumbs-down")
valueBox(107, caption = "Trials", icon="fa-tag")
valueBox(247, caption = "Connections", icon="fa-random")

flexdashboard documentation built on July 8, 2020, 7:32 p.m.