Skip to content
nexubDesign System
v2.4.0

Patterns · Data

StatCard

Since v0.0.1

Metric display card showing a KPI value, label, optional delta, and icon.

import { StatCard } from '@nexub/patterns';

Examples

Default

With icon

Animated

Props

Props
PropTypeDefaultDescription
labelrequiredstring—Metric name label.
valuerequiredReact.ReactNode—Primary metric value.
deltastring—Change value (e.g. "+12.5%").
deltaType'increase' | 'decrease' | 'neutral'—Semantic direction of the delta.
sentiment'positive' | 'negative' | 'neutral'—Colour of the delta, independent of the arrow. Defaults from deltaType; use it when a decrease is good news (e.g. churn down).
iconReact.ReactNode—Icon displayed in the card header.
descriptionstring—Additional context below the value.
animatebooleanfalseRoll the digits when a number or string value changes (NumberTicker), announced politely. The first render never animates.

On iOS & Android