Elements

Data elements

Progress, gauges, charts, and lists.

progress

Tier: core

Linear or circular progress indicator.

From showcase preset — case fitness.medium.

Properties

PropertyTypeDefaultDescription
accentableboolean—Apple tinted / accented Home Screen: draw this part in the accent color (widgetAccentable). Ignored elsewhere.
accessibilityLabelstring—Text read by screen readers instead of the visible content.
aspectRationumber—Keep width / height at this ratio (1 = square).
backgroundBackgroundValue—Solid, adaptive, or gradient background.
barStyleProgressStyle—linear (default) or circular.
bindobject—Set fields from data with their JSON type: {"value": "data.progress"}. Use for numbers / booleans / arrays ({{…}} only fills strings).
borderBorderConfig—Border color and width.
clipShapeClipShape—Clip content to a shape (e.g. circle avatar from square image).
colorColorValue—Track / label color.
cornerRadiusnumber—Corner radius in points.
endAtinteger—Unix ms the time-driven bar reaches full (see startAt).
flexnumber—Layout weight for flexible sizing inside stacks (like Android layout_weight).
frameFrameConfig—Explicit width / height / max constraints.
labelstring—Caption above the bar. Always set on Android so hosts never show null.
layoutPrioritynumber—Who keeps its size in a crowded stack: higher first. Default 0.
marginPaddingValue—Outer spacing (number or per-edge object), outside background and border.
offsetXnumber—Move right by points after layout (does not affect siblings).
offsetYnumber—Move down by points after layout (does not affect siblings).
opacitynumber—Opacity from 0 (invisible) to 1 (opaque).
paddingPaddingValue—Inset padding (number or per-edge object).
privacySensitiveboolean—Hide this content where the OS redacts private data (iOS / macOS locked screen, StandBy). Ignored where no redaction exists.
rotationnumber—Rotate by degrees (clockwise).
scalenumber—Scale factor (1 = unchanged).
shadowShadowConfig—Drop shadow.
startAtinteger—Unix ms: with endAt, the bar fills by itself between the two times (no refresh needed on Apple / desktop). WidgetKit animates it live only for spans up to 10 minutes (a live bar keeps Notification Center busy); a longer span shows the value at each timeline entry / reload.
thicknessnumber—Bar height (linear) or ring width (circular) in points.
tintColorValue—Accent / fill color for the completed portion.
totalnumber1Denominator for the ratio. Default 1.0.
trackColorColorValue—Color of the unfilled track.
transitionTransition—How this element changes between timeline entries / redraws (a hint): numeric animates digits, opacity cross-fades, slide pushes from the bottom. Apple and desktop animate; Android and Adaptive Cards ignore it.
valuenumber—Current value. Clamped to 0..=total by renderers.
whenobject—Show only when the condition holds ({"path": "data.n", "gt": 0}; see crate::resolve). Removed before rendering.

Examples

Minimal

{
  "type": "progress",
  "value": 0.7,
  "total": 1,
  "tint": "#4CAF50",
  "color": "secondaryLabel",
  "label": "Humidity",
  "barStyle": "linear"
}

From showcase fitness.medium

{
  "type": "progress",
  "value": 0.45,
  "tint": "#4ecdc4",
  "label": "Calories",
  "color": "#94a3b8"
}

From showcase fitness.small

{
  "type": "progress",
  "value": 0.45,
  "tint": "#4ecdc4",
  "label": "Cal",
  "color": "#94a3b8"
}

Inside a WidgetConfig

{
  "small": {
    "type": "progress",
    "value": 0.7,
    "total": 1,
    "tint": "#4CAF50",
    "color": "secondaryLabel",
    "label": "Humidity",
    "barStyle": "linear"
  }
}

gauge

Tier: extended

Circular or capacity-style gauge.

From showcase preset — case fitness.medium.

Properties

PropertyTypeDefaultDescription
accentableboolean—Apple tinted / accented Home Screen: draw this part in the accent color (widgetAccentable). Ignored elsewhere.
accessibilityLabelstring—Text read by screen readers instead of the visible content.
aspectRationumber—Keep width / height at this ratio (1 = square).
backgroundBackgroundValue—Solid, adaptive, or gradient background.
bindobject—Set fields from data with their JSON type: {"value": "data.progress"}. Use for numbers / booleans / arrays ({{…}} only fills strings).
borderBorderConfig—Border color and width.
clipShapeClipShape—Clip content to a shape (e.g. circle avatar from square image).
colorColorValue—Secondary / track color.
cornerRadiusnumber—Corner radius in points.
currentValueLabelstring—Text shown for the current value (e.g. "72%").
endAtinteger—Unix ms the time-driven gauge reaches max.
flexnumber—Layout weight for flexible sizing inside stacks (like Android layout_weight).
frameFrameConfig—Explicit width / height / max constraints.
gaugeStyleGaugeStyle—Visual style (e.g. circular).
labelstring—Optional caption.
layoutPrioritynumber—Who keeps its size in a crowded stack: higher first. Default 0.
marginPaddingValue—Outer spacing (number or per-edge object), outside background and border.
maxnumber—Upper bound. Default 1.
maxLabelstring—Label at the maximum end.
minnumber—Lower bound. Default 0.
minLabelstring—Label at the minimum end.
offsetXnumber—Move right by points after layout (does not affect siblings).
offsetYnumber—Move down by points after layout (does not affect siblings).
opacitynumber—Opacity from 0 (invisible) to 1 (opaque).
paddingPaddingValue—Inset padding (number or per-edge object).
privacySensitiveboolean—Hide this content where the OS redacts private data (iOS / macOS locked screen, StandBy). Ignored where no redaction exists.
rotationnumber—Rotate by degrees (clockwise).
scalenumber—Scale factor (1 = unchanged).
shadowShadowConfig—Drop shadow.
startAtinteger—Unix ms: with endAt, the gauge moves by itself between the two times.
tintColorValue—Accent color.
transitionTransition—How this element changes between timeline entries / redraws (a hint): numeric animates digits, opacity cross-fades, slide pushes from the bottom. Apple and desktop animate; Android and Adaptive Cards ignore it.
valuenumber—Current value within [min, max].
whenobject—Show only when the condition holds ({"path": "data.n", "gt": 0}; see crate::resolve). Removed before rendering.

Examples

Minimal

{
  "type": "gauge",
  "value": 0.72,
  "min": 0,
  "max": 1,
  "label": "CPU",
  "currentValueLabel": "72%",
  "tint": "#38bdf8",
  "gaugeStyle": "circular"
}

From showcase fitness.medium

{
  "type": "gauge",
  "value": 0.72,
  "min": 0,
  "max": 1,
  "currentValueLabel": "72%",
  "label": "Steps",
  "gaugeStyle": "circular",
  "tint": "#ff6b6b"
}

From showcase gauge-square.small

{
  "type": "gauge",
  "value": 0.72,
  "min": 0,
  "max": 1,
  "label": "CPU",
  "currentValueLabel": "72%",
  "tint": "#7aa2f7",
  "gaugeStyle": "circular"
}

Inside a WidgetConfig

{
  "small": {
    "type": "gauge",
    "value": 0.72,
    "min": 0,
    "max": 1,
    "label": "CPU",
    "currentValueLabel": "72%",
    "tint": "#38bdf8",
    "gaugeStyle": "circular"
  }
}

chart

Tier: extended

Bar, line, area, or pie chart.

From showcase preset — case chart-mix.medium.

Properties

PropertyTypeDefaultDescription
accentableboolean—Apple tinted / accented Home Screen: draw this part in the accent color (widgetAccentable). Ignored elsewhere.
accessibilityLabelstring—Text read by screen readers instead of the visible content.
aspectRationumber—Keep width / height at this ratio (1 = square).
backgroundBackgroundValue—Solid, adaptive, or gradient background.
bindobject—Set fields from data with their JSON type: {"value": "data.progress"}. Use for numbers / booleans / arrays ({{…}} only fills strings).
borderBorderConfig—Border color and width.
chartDataChartDataPoint[]—Data points (label + value, optional per-point color).
chartTypeany—Chart kind: bar, line, area, or pie.
clipShapeClipShape—Clip content to a shape (e.g. circle avatar from square image).
cornerRadiusnumber—Corner radius in points.
flexnumber—Layout weight for flexible sizing inside stacks (like Android layout_weight).
frameFrameConfig—Explicit width / height / max constraints.
innerRadiusnumber—Pie hole as a fraction of the radius (0.6 = donut). Default 0.
interpolationChartInterpolation—Line / area curve: linear (default), monotone, step.
layoutPrioritynumber—Who keeps its size in a crowded stack: higher first. Default 0.
marginPaddingValue—Outer spacing (number or per-edge object), outside background and border.
offsetXnumber—Move right by points after layout (does not affect siblings).
offsetYnumber—Move down by points after layout (does not affect siblings).
opacitynumber—Opacity from 0 (invisible) to 1 (opaque).
paddingPaddingValue—Inset padding (number or per-edge object).
privacySensitiveboolean—Hide this content where the OS redacts private data (iOS / macOS locked screen, StandBy). Ignored where no redaction exists.
rotationnumber—Rotate by degrees (clockwise).
scalenumber—Scale factor (1 = unchanged).
shadowShadowConfig—Drop shadow.
showLegendboolean—Show a legend of series (or pie slices). Default false.
showXAxisboolean—Show the x axis labels (bar / line / area). Unset keeps each platform's classic chart (labels on Apple and desktop, none on Android); set it to match.
showYAxisboolean—Show the y axis. Default false.
tintColorValue—Default series tint.
transitionTransition—How this element changes between timeline entries / redraws (a hint): numeric animates digits, opacity cross-fades, slide pushes from the bottom. Apple and desktop animate; Android and Adaptive Cards ignore it.
whenobject—Show only when the condition holds ({"path": "data.n", "gt": 0}; see crate::resolve). Removed before rendering.
yMaxnumber—Upper bound of the y scale (default: data maximum).
yMinnumber—Lower bound of the y scale (default: data minimum or 0).

Examples

Minimal

{
  "type": "chart",
  "chartType": "bar",
  "tint": "#38bdf8",
  "chartData": [
    {
      "label": "Mon",
      "value": 120
    },
    {
      "label": "Tue",
      "value": 90
    },
    {
      "label": "Wed",
      "value": 150
    }
  ]
}

From showcase chart-mix.medium

{
  "type": "chart",
  "chartType": "bar",
  "tint": "#22c55e",
  "chartData": [
    {
      "label": "M",
      "value": 3,
      "color": "#22c55e"
    },
    {
      "label": "T",
      "value": 5,
      "color": "#3b82f6"
    },
    {
      "label": "W",
      "value": 2,
      "color": "#f59e0b"
    },
    {
      "label": "T",
      "value": 7,
      "color": "#ef4444"
    }
  ]
}

From showcase stress-nest.large

{
  "type": "chart",
  "chartType": "bar",
  "flex": 1,
  "tint": "#38bdf8",
  "chartData": [
    {
      "label": "a",
      "value": 2,
      "color": "#38bdf8"
    },
    {
      "label": "b",
      "value": 5,
      "color": "#818cf8"
    },
    {
      "label": "c",
      "value": 1,
      "color": "#c084fc"
    },
    {
      "label": "d",
      "value": 7,
      "color": "#f472b6"
    },
    {
      "label": "e",
      "value": 4,
      "color": "#fb7185"
    }
  ]
}

Inside a WidgetConfig

{
  "small": {
    "type": "chart",
    "chartType": "bar",
    "tint": "#38bdf8",
    "chartData": [
      {
        "label": "Mon",
        "value": 120
      },
      {
        "label": "Tue",
        "value": 90
      },
      {
        "label": "Wed",
        "value": 150
      }
    ]
  }
}

list

Tier: extended

Collection list of rows (text, optional checked marker and action).

From showcase preset — case android-list.large.

Properties

PropertyTypeDefaultDescription
accentableboolean—Apple tinted / accented Home Screen: draw this part in the accent color (widgetAccentable). Ignored elsewhere.
accessibilityLabelstring—Text read by screen readers instead of the visible content.
aspectRationumber—Keep width / height at this ratio (1 = square).
backgroundBackgroundValue—Solid, adaptive, or gradient background.
bindobject—Set fields from data with their JSON type: {"value": "data.progress"}. Use for numbers / booleans / arrays ({{…}} only fills strings).
borderBorderConfig—Border color and width.
childrenWidgetElement[]—Rich rows as nested elements (alternative to typed ListItems).
clipShapeClipShape—Clip content to a shape (e.g. circle avatar from square image).
colorColorValue—Row text color.
cornerRadiusnumber—Corner radius in points.
flexnumber—Layout weight for flexible sizing inside stacks (like Android layout_weight).
fontSizenumber—Row text font size.
frameFrameConfig—Explicit width / height / max constraints.
itemsListItem[]—Row items.
layoutPrioritynumber—Who keeps its size in a crowded stack: higher first. Default 0.
marginPaddingValue—Outer spacing (number or per-edge object), outside background and border.
offsetXnumber—Move right by points after layout (does not affect siblings).
offsetYnumber—Move down by points after layout (does not affect siblings).
opacitynumber—Opacity from 0 (invisible) to 1 (opaque).
paddingPaddingValue—Inset padding (number or per-edge object).
privacySensitiveboolean—Hide this content where the OS redacts private data (iOS / macOS locked screen, StandBy). Ignored where no redaction exists.
rotationnumber—Rotate by degrees (clockwise).
scalenumber—Scale factor (1 = unchanged).
shadowShadowConfig—Drop shadow.
spacingnumber—Space between rows (points).
transitionTransition—How this element changes between timeline entries / redraws (a hint): numeric animates digits, opacity cross-fades, slide pushes from the bottom. Apple and desktop animate; Android and Adaptive Cards ignore it.
whenobject—Show only when the condition holds ({"path": "data.n", "gt": 0}; see crate::resolve). Removed before rendering.

Examples

Minimal

{
  "type": "list",
  "spacing": 4,
  "fontSize": 14,
  "items": [
    {
      "text": "Alpha",
      "checked": true,
      "action": "row",
      "payload": "a"
    },
    {
      "text": "Beta",
      "checked": false,
      "action": "row",
      "payload": "b"
    },
    {
      "text": "Gamma"
    }
  ]
}

From showcase android-list.large (size root)

{
  "type": "list",
  "items": [
    {
      "text": "Alpha",
      "checked": true,
      "action": "row",
      "payload": "a"
    },
    {
      "text": "Beta",
      "checked": false,
      "action": "row",
      "payload": "b"
    },
    {
      "text": "Gamma"
    }
  ],
  "spacing": 2,
  "fontSize": 14
}

From showcase list-20-items.large (size root)

{
  "type": "list",
  "spacing": 2,
  "fontSize": 12,
  "color": "#e2e8f0",
  "background": "#0f172a",
  "padding": 8,
  "items": [
    {
      "text": "Item 01",
      "checked": false
    },
    {
      "text": "Item 02",
      "checked": true
    },
    {
      "text": "Item 03"
    },
    {
      "text": "Item 04"
    }
  ]
}

Inside a WidgetConfig

{
  "small": {
    "type": "list",
    "spacing": 4,
    "fontSize": 14,
    "items": [
      {
        "text": "Alpha",
        "checked": true,
        "action": "row",
        "payload": "a"
      },
      {
        "text": "Beta",
        "checked": false,
        "action": "row",
        "payload": "b"
      },
      {
        "text": "Gamma"
      }
    ]
  }
}