value_box: Create a value text box with optional description and colour

View source: R/value_box.R

value_boxR Documentation

Create a value text box with optional description and colour

Description

This function generates a value text box with an optional description and customisable colour.

Usage

value_box(value = "your value goes here", text = NA, colour = "blue")

Arguments

value

Character. The primary value to display in the value box. Defaults to "your value goes here"

text

Character or NA. An optional description to appear below the value. If not provided (default is NA), the description will not be displayed

colour

Character. A colour to apply to the value box. Defaults to "blue". Choose from the following: "grey", "purple", "teal", "blue", "yellow", "orange", "red", "magenta", or "green"

Details

The text box can be used in Shiny applications to display highlighted information, such as statistics or key metrics.

Value

A Shiny div tag representing the value box, styled according to the specified parameters

See Also

Other Govstyle feedback types: details(), gov_summary(), insert_text(), label_hint(), noti_banner(), panel_output(), tag_Input(), warning_text()

Examples

value_box(
  value = "1,000,000",
  text = "This is the latest value for the selected inputs.",
  colour = "purple"
)

shinyGovstyle documentation built on April 13, 2026, 5:06 p.m.