Skip to content

Search

Start typing to search.


Show all pages

Documentation

data

Stat

One number with its label and context, such as lessons this week or open invoices.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

A label, the value and a line of context.

Lessons this week

42

8 more than last week

HTML

Examples

Group

Lay several stats out with Tailwind's grid utilities.

Students

128

12 started this month

Pass rate

74%

First attempt, last 12 months

Open invoices

€ 1,240

3 overdue

HTML

Guidance and accessibility

When to use

  • Use stats for the few numbers people check first on a dashboard or an overview.
  • Give every number context: a period, a comparison or a goal.
  • Write a change in words, such as “8 more than last week”. An arrow or a color alone does not say whether the change is good.

Accessibility

  • The label comes before the value in the markup, so screen readers read “Lessons this week, 42”.
  • Do not rely on color for up or down; the description says it.
  • Write units and currencies in the value, such as “€ 1,240”.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the stat component
ClassKindUse it for
ca-statComponentStack of label, value and description.
ca-stat__labelPartWhat the number counts.
ca-stat__valuePartThe number itself, with tabular figures.
ca-stat__descriptionPartContext, such as the change since last week.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Lessons this week

42

8 more than last week

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Lessons this week

42

8 more than last week

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

Lessons this week

42

8 more than last week

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Lessons this week

42

8 more than last week

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />