From 61b89961db5e415cc2cad26bf6ff3ce21b103a09 Mon Sep 17 00:00:00 2001 From: stroblme Date: Mon, 5 Oct 2026 18:57:58 +0200 Subject: [PATCH] Document the icon and colour names a forecast can carry --- docs/reference/payload-types.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/reference/payload-types.md b/docs/reference/payload-types.md index 12feca7..99f23f6 100644 --- a/docs/reference/payload-types.md +++ b/docs/reference/payload-types.md @@ -174,6 +174,28 @@ carry one of them literally is asking for a value this engine reads as a name. Enforced on the server as well as in the editor. +## Icon and colour names + +A forecast is a `list` of records, one per column, each shaped +`{label, icon, value}` with an optional `color`. The flow decides what a +column is called and which glyph it gets; the widget only draws it. + +```json +[{"label": "Today", "icon": "cloud-rain", "color": "primary", "value": "14°"}] +``` + +`icon` and `color` are names from a fixed vocabulary, the same one the icon +widget's picker offers: + +| | Names | +|---|---| +| Icons | `sun`, `moon`, `cloudy`, `cloud-rain`, `cloud-drizzle`, `cloud-snow`, `cloud-lightning`, `cloud-fog`, `wind`, `umbrella`, `snowflake`, `droplets`, `thermometer`, `thermometer-sun`, `flame`, `fan`, `sun-snow`, `door-open`, `house`, `bed`, `lightbulb`, `plug`, `music`, `volume-2`, `volume-x`, `zap`, `battery-charging`, `arrow-up`, `arrow-down`, `triangle-alert`, `check`, `circle-check` | +| Colours | `default`, `muted`, `primary`, `success`, `danger` | + +An empty icon draws nothing. An unknown one draws a placeholder glyph and an +unknown colour draws as `default`; either warns once in the browser console, +listing the names it expected. + ## Type failures A value that does not match its port's declaration raises on the node that