stat
Display The small pieces of vocabulary a screen is assembled from: status, identity, progress, data tables and charts, and the one alert shape.
One number on a dashboard, with a label and how much it changed.
Each example is live, but its links go nowhere. HTML shows the markup to copy.
The big number
Give one stat in the row rst-stat="lead" to make it big. It is the same component, just larger.
Put this inside <div rst-stats>.
<div rst-stat ="lead" >
<span rst-stat-label >Revenue this month</span >
<span rst-stat-num >€48,210</span >
<span rst-stat-delta rst-tone ="positive" >+12%</span >
<span rst-stat-note >vs. last month</span >
</div >
A smaller number
You only need a label and a number. Everything else is optional.
Put this inside <div rst-stats>.
<div rst-stat >
<span rst-stat-label >Unpaid invoices</span >
<span rst-stat-num >24</span >
</div >
When going down is good
You set the colour, not the component. Here the number went down and that is good news, so the change is green.
Put this inside <div rst-stats>.
<div rst-stat >
<span rst-stat-label >Time to first reply</span >
<span rst-stat-num >1h 12m</span >
<span rst-stat-delta rst-tone ="positive" >−38%</span >
<span rst-stat-note >vs. last week</span >
</div >
When going up is bad
Here the number went up and that is bad news, so the change is red.
Put this inside <div rst-stats>.
<div rst-stat >
<span rst-stat-label >Failed payments</span >
<span rst-stat-num >9</span >
<span rst-stat-delta rst-tone ="negative" >+3</span >
<span rst-stat-note >vs. last week</span >
</div >
When you cannot say
Leave the colour out and the change is grey. Do that when you cannot say if it is good or bad.
Put this inside <div rst-stats>.
<div rst-stat >
<span rst-stat-label >Average session length</span >
<span rst-stat-num >4m 12s</span >
<span rst-stat-delta rst-tone ="neutral" >+18s</span >
<span rst-stat-note >since Friday</span >
</div >
A shortened number
Showing 4.1k instead of 4120? Put the full number in a <data> tag's value. Screen readers only read what is on screen, so keep anything a person needs in the number itself.
Put this inside <div rst-stats>.
<div rst-stat >
<span rst-stat-label >Messages sent</span >
<span rst-stat-num ><data value ="4120" >4.1k</data ></span >
</div >