MetricBreakdown
The decomposed-metric dashboard card: headline value, tone-aware rate, Sparkline trend, per-category share rows, and a chip footer.
It holds a preformatted headline value with its caption, an optional secondary rate readout top right (toned by rateSuccess, rateWarning, or rateDestructive), an optional trend strip drawn by the kit Sparkline with a latest-value caption above the plot, per-category breakdown rows with proportional share bars and Stats-style deltas, and a chips footer for recent notable codes. Every section is independently optional, so one layout backs OAuth token issuance, API request volume, sign-up sources, and any metric that needs decomposition plus trend in one card.
3,771
Tokens issued
authorization_code
1.8k
+12%
refresh_token
1.3k
+4%
client_credentials
618
-3%
iOS
3,771
Tokens issued
authorization_code
1.8k
+12%
refresh_token
1.3k
+4%
client_credentials
618
-3%
Android
3,771
Tokens issued
authorization_code
1.8k
+12%
refresh_token
1.3k
+4%
client_credentials
618
-3%
Web
tsx
Default
Rate and trend
Plain, inside a card
Props
Do & Don’t
MetricBreakdown
Don’t
Rebuilding the header and trend from Text and Sparkline at the call site splits the anatomy the card owns and loses the rows' accessible shares.
Do
12.4k
Requests
0.74%
Error rate
GET
8
+8%
POST
4
+21%
Pass preformatted strings and semantic tone booleans; the card owns the header, trend, rows, and chip anatomy.