Zum Inhalt springen

Status-Widget

Ein einzelner Zustand – gesund, beeinträchtigt, ausgefallen – getragen von einem Symbol und einer Schweregrad-Farbe statt einer Zahl.

The status template is the one that carries no number. It shows a large severity icon, a headline, and the subtitle broken into pills — the shape you want when the answer is "everything is fine" or "something is on fire", not "73".

Fields

FieldTypeNotes
templatestringRequired. Must be "status"
severitystringOne of info, warning, critical, success. Not required by the server, but the field the template is built around: it picks both the icon and the color
labelstringThe headline under the icon. Falls back to the widget's name when unset. Max 256 characters
subtitlestringSplit at ·, |, , , and ; into tag pills tinted by severity. Max 256 characters
iconstringOverrides the severity icon. SF Symbol name, or an MDI icon prefixed mdi:. Max 128 characters
accent_color, background_color, text_colorstringShared content fields — see the API reference. An explicit accent_color overrides the severity color

Example: incident state

PATCH /widgets/incident
{
  "content": {
    "template": "status",
    "severity": "warning",
    "label": "Incident",
    "subtitle": "INC-2841 · api-gateway · investigating",
    "url_action": { "title": "Ack", "icon": "checkmark.circle.fill", "url": "https://example.com/ack/2841" }
  }
}

Behavior

Severity picks the icon as well as the color, and that pairing is deliberate: on the Lock Screen widgets render in a single vibrant tint, so a red circle and a green circle look identical there. The shape is what survives — an octagon for critical, a triangle for warning, a check for success, an "i" for info, and a plain filled circle when severity is unset.

Info

Setting icon replaces the severity glyph everywhere, including the Lock Screen, so a custom icon costs you that at-a-glance distinction. Use it for a brand or service mark on a widget that stays at one severity, not on one that flips between states.

Severity also tints the whole surface — header hairline, pills, and the action buttons — rather than just the icon, so a critical widget does not end up red with a blue button. Sending accent_color takes that decision back and applies your color at every severity.

If you find yourself encoding a count into the subtitle ("3 down"), the shape you want is probably stat_list or value. Status is for the state itself.

Flip through the four severities on the playground to see how each one reads on the Home Screen and in the Lock Screen's vibrant rendering.