value_box: Value Box

Description Usage Arguments Details Value

Description

This is a function that creates a value box but allows you to customize the colors inside the value box.

Usage

1
2
3
4
5
6
7
8
9
value_box(
  value,
  subtitle,
  icon = NULL,
  color = "#ffffff",
  background = "#2180BC",
  width = 4,
  href = NULL
)

Arguments

value

the value to be displayed in the value box, typically a numeric

subtitle

the text that will be displayed underneath the value, typically a string

icon

the icon that will appear on the right side of the value box, from 'icon()'

color

the color of the text in hex format, generally '#FFFFFF'

background

the color of the background in hex format

width

the width of the value box (bootstrap grid system), defaults to 4

href

an optional argument for adding a link to the value box

Details

This function build on the valueBox functions from the 'shinydashboard' package. Having color arguments allows the valueboxes in the Shiny Apps to be more in line with the cla color scheme. The function was adapted from RStudioCommunity and was posted by the user efhopkins on 2018-09-18.

Value

html tags that can be placed inside 'shinydashboard::renderValueBox()'


srmatth/historicalInvesting documentation built on Dec. 23, 2021, 4:30 a.m.