About this set
Three dashboard KPI cards: Revenue, Active users and Conversion rate. Each card has a label, an emoji icon on a tinted tile, a large figure, a green or red pill with the change against last month, and a seven-bar sparkline whose last bar is highlighted in the card’s accent colour. The sparkline needs no chart library and no SVG: it is a flex row of empty elements aligned to the bottom, each with an inline height percentage, and the highlighted bar takes its colour from currentColor so one class sets the accent. The up and down arrows are hidden from screen readers and replaced with the words Up and Down, and each sparkline is a role=”img” with a short description of its trend. Use these at the top of admin dashboards, analytics pages or reports; set the bar heights from your data on the server or with a line of script. Cards lift slightly on hover. The third card shows a falling conversion rate in red, because for that metric a drop is bad news. The Bootstrap version uses .card and .badge in a .row-cols-auto grid.
What’s included
- Sparkline built from plain elements with percentage heights
- Accent colour set once through currentColor
- Up and down change pills with screen-reader words in place of arrows
- Label as a heading, figure and comparison period on every card
- No JavaScript; hover lift is off under prefers-reduced-motion
Accessibility
Each card is headed by its metric name, the arrow glyphs are aria-hidden with visually hidden Up or Down text beside them, and each sparkline has role="img" with a label such as Last seven months, trending up. The vs last month caption was darkened to pass 4.5:1 on both pill colours, and the hover lift is turned off under prefers-reduced-motion.
Customise it
Set the accent per card with .sc-s1, .sc-s2 and .sc-s3, the pill colours in .sc-up and .sc-down, and the bar heights in the inline styles. In Bootstrap the pill text colour is --bs-badge-color on .sc-up and .sc-down; in Tailwind change the h-[..%] classes and the highlighted bar's bg- utility.




















