Component
Card metric
Published on
Description
A card metric shows one number with a label underneath. Use it for dashboard summaries: counts, totals, scores. The number is formatted with DataNumber, so it follows the locale of the reader.
Use a regular Card when the content needs a heading, a description or a link.
Example
Accessibility
- The card is an
<article>named by its label througharia-labelledby, so each metric is announced by what it measures. - The number is a
<data>element whosevaluecarries the machine-readable figure. - Pass a unique
idper card so the generated label ids do not collide.
References
Related
- Card — for content with a heading and a link
- DataNumber — the number formatter used inside
Variables
value— the number to showid— used to build the label idchildren— the label