WireScript
Components

metric

Key metric with optional trend indicator.

Displays a key metric with label, value, and optional change/trend indicators.

Usage

With Trend

Properties

accepts contentaccepts children

Sizing

PropertyTypeDefault
:fullflag-
:fitflag-
:fillflag-

Dimensions

PropertyTypeDefault
:widthany-
:heightany-

Variants

PropertyTypeDefault
:primaryflag-
:secondaryflag-
:ghostflag-
:dangerflag-
:successflag-
:warningflag-
:infoflag-

Input

PropertyTypeDefault
:valueany-

Content

PropertyTypeDefault
:labelstring-
:changeany-
:trendsymbol-

Note: The content string can be used as an alternative to :label. For example, (metric "Revenue" :value "$1,234") is equivalent to (metric :label "Revenue" :value "$1,234").

Note: Variant flags apply color to the value text. For example, :success makes the value green, :danger makes it red.

Examples

With Variant Colors

Dashboard Metrics

Metric Cards

Detailed Stats

Simple Stats

On this page