Elements

Spacing elements

Spacers and dividers.

spacer

Tier: core

Flexible empty space.

From showcase preset — case calculator.small.

Properties

PropertyTypeDefaultDescription
minLengthnumber—Minimum length along the parent axis (points).

Examples

Minimal

{
  "type": "spacer",
  "minLength": 8
}

From showcase calculator.small

{
  "type": "spacer"
}

From showcase upcoming-payments.large

{
  "type": "spacer",
  "minLength": 4
}

Inside a WidgetConfig

{
  "small": {
    "type": "spacer",
    "minLength": 8
  }
}

divider

Tier: core

Horizontal or vertical rule.

From showcase preset — case calculator.small.

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—Line color.
cornerRadiusnumber—Corner radius in points.
flexnumber—Layout weight for flexible sizing inside stacks (like Android layout_weight).
frameFrameConfig—Explicit width / height / max constraints.
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.
thicknessnumber—Line thickness in 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": "divider",
  "thickness": 1,
  "color": "separator"
}

From showcase calculator.small

{
  "type": "divider",
  "color": "#3a3a3c",
  "thickness": 1
}

From showcase fitness.medium

{
  "type": "divider",
  "color": "#334155"
}

Inside a WidgetConfig

{
  "small": {
    "type": "divider",
    "thickness": 1,
    "color": "separator"
  }
}