Component
Metric
Show key numbers with labels, descriptions, and optional trend state.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Metric } from "@chitrank2050/monoline-ui/metric"Basic usage
<Metric
size="md"
value="14"
label="Production apps"
description="Shipped across portfolio, docs, and internal tools."
trend="up"
/>Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Metric highlights one value with a compact label, optional trend, and short explanation.
The value represents continuous progress, belongs in a dense table, or needs a chart to explain its trend.
Metric places its text in generic divs and shows trend with an arrow. Add spoken context when the direction has meaning.
This component can render without adding a Monoline client boundary when its children and props are serializable.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
import { Metric } from "@chitrank2050/monoline-ui/metric"
export function Stats() {
return (
<Metric
value="9"
label="Years"
description="React, Node, and ML infrastructure."
/>
)
}Related documentation
Compare related components or review the package and theme setup.