feat(core): add all-in-one MetricCard component - #3326
Open
FrancescoCastaldi wants to merge 2 commits into
Open
Conversation
- add <MetricCard> / metric_card tag combining BigValue, Sparkline trend, and Delta badge - support automatic delta calculation and comparison period labeling - support interactive sparkline rendering (line, area, bar) - support optional clickable card links and info tooltip - add unit test suite
|
Someone is attempting to deploy a commit to the Evidence Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Hi @archiewood @hughess! 👋 This PR introduces the all-in-one KPI component combining BigValue, Sparkline trend, and Delta badge. Whenever you get a chance, we would love your review! |
Member
|
Hi @FrancescoCastaldi - why not use (or adjust) |
…chip instead of separate metric_card tag
Author
|
Good point @hughess! Refactored to build directly on top of �ig_value instead of introducing a separate tag. We have removed the standalone metric_card and extended �ig_value to support:
All tests updated and passing! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces the
<MetricCard>(metric_card) all-in-one KPI card component.Modern dashboards frequently need compact, highly readable summary cards that unify the primary metric figure, comparison/trend badges, and sparkline history in a clean card container.
Features
value_fmt="usd",value_fmt="pct").sparkline_date="date_col",sparkline_value="val_col",sparkline_type="line|area|bar".comparison="prior_col"or explicit delta/values).badge=true) or plain deltas withdown_is_goodawareness.link="/details"turns the entire card into an interactive card button with hover elevation.MetricCard.test.ts.