The design

kanso-ui does not have this component yet. This is the Kanso design system's own drawing of it, in HTML and CSS with kanso-ui's tokens.

When to use

  • Use the hero (k-figure--hero) for the one number that matters on a screen: "1,240.50" under "Balance". One per screen.
  • Use the display size (k-figure--display) for that number where 52px does not fit: a sheet, a dialog, a narrow column. It takes the hero's place; it never sits beside one.
  • Use mono everywhere else: every other amount, time and count set as a figure, at the end of a row, in a table cell or in a meter, is Roboto Mono with tabular figures, so columns line up. Inside running text and captions a number keeps the face of the text, as in "7-day average 133.68".
  • For a figure with a bar, use Meter.