Widget info
Input contract —
Widget info · developer handover
Mini Stat Row
A headed row of small stat tiles — one measure each, pre-formatted, with an optional sub-line. The trust page's Trust resilience strip.
Live example
Athena Learning Trust's resilience figures, from TRUSTSTrust resilience
HighResilience
£4.4mReserves£660 per pupil
+£0.6mLatest year
Stable / positiveDirection
EdCo data mapping — proposed
Proposed reading of the Metrics shape, one one-measure frame per tile. This is what the builder's proposed Mini Stat Triple elements assume.
| Visual | Shape column | Contract field | Row | Notes |
|---|---|---|---|---|
| Heading | RecordCategory | Panel title | — | "Trust resilience"; could equally be the section name in the builder. |
| Tile value | AbsoluteValue (number) or ValueContext (category) | value | the organisation's row, per tile | "High" and "Stable / positive" are categories — ValueDataType would be Text. |
| Tile label | DataCategory | label | per tile | |
| Sub-line ("£660 per pupil") | PerPupilValue | sub | per tile | Only the Reserves tile uses it. |
| Change (not shown here) | ChangePP | — | per tile | The builder's 'Show change' setting would surface this. |
Widget elements and their frames
What tblWidgetElements would hold for this widget, and the kind of frame each element takes.
| Element | Shape | Frame it takes | Notes |
|---|---|---|---|
| First figure | Metrics | One-measure frame: Resilience rating. | Categorical value. |
| Second figure | Metrics | One-measure frame: Revenue reserves (with PerPupilValue). | |
| Third figure | Metrics | One-measure frame: Latest in-year position. | Signed. |
| Fourth figure | Metrics | One-measure frame: Direction of travel. | Categorical value. |
Dependencies
Component: app/components/MiniStat.vue (+ app/components/Panel.vue)
Explicit imports
None. MiniStat is a leaf: three strings in, a tile out.
Auto-imported components (Nuxt)
The row is composed on the page, not inside a widget component.
Panel—components/Panel.vueThe small heading above the tiles ("TRUST RESILIENCE" with its icon). Unbordered, so the tiles keep the floating-card feel.MiniStat—components/MiniStat.vueOne tile: value, label, optional sub-line. Uses the `.surface` card class from main.css.
Framework APIs
None — no state, no events.
Input contract — resilience: Resilience
Defined in app/data/trusts.ts. Four pre-formatted strings; the page maps each to a tile.
| Field | Type | Notes |
|---|---|---|
| rating | string | A categorical value, e.g. "High" — rendered as the headline of the first tile. |
| reserves | string | Pre-formatted money, e.g. "£4.4m". |
| reservesPerPupil | string | Pre-formatted, e.g. "£660" — shown as the sub-line "£660 per pupil". |
| latestYear | string | Pre-formatted signed money, e.g. "+£0.6m". |
| direction | string | A categorical value, e.g. "Stable / positive". |
Props & events
| Prop | Type | Notes |
|---|---|---|
| MiniStat: value | string | The headline, pre-formatted. Text or number — the tile doesn't care. |
| MiniStat: label | string | The caption under the value. |
| MiniStat: sub | string? | An optional second caption, e.g. "£660 per pupil". |
| Panel: title, icon | string, string? | The heading above the row. |
Wiring it to the API
- Each tile is one measure for the organisation: four tiles, four values. All arrive pre-formatted as strings; two of them (rating, direction) are categories, not numbers.
- In the builder this is a Mini Stat Triple with a fourth element, or four Mini Stats in a four-slot section. Either way each tile is its own element bound to a one-measure frame.
- The row wraps to two columns on narrow screens (grid-cols-2 sm:grid-cols-4); the page owns that, not the tile.
- No modes, no interaction, no events.
For the spec to decide
- Is this Mini Stat Triple with a configurable number of tiles (3–4), or four separate Mini Stat widgets in a four-slot section? The builder supports both; one is simpler to specify.
- How are categorical values ("High", "Stable / positive") carried in the Metrics shape — ValueContext, Message, or a ValueDataType of Text with the value in AbsoluteValue as a string?
- Should tiles show change chips (ChangePP) by default? The current design doesn't.
- Is the heading the section's name (builder) or part of the widget?

