Skip to contents

Helper to render a compact metric with optional icon, value, and label consistently across the module. Supports both static text values and dynamic Shiny output elements like textOutput().

Usage

metric_block(value, label, icon = NULL, highlight = FALSE)

Arguments

value

Character string or Shiny output element (e.g., textOutput()). The primary metric value to display.

label

Character string. Secondary label describing the metric.

icon

Optional character string. Name of Font Awesome icon to render.

highlight

Logical. Whether to apply highlight styling.

Value

A `shiny.tag` representing the metric block.