Layouts

Layouts define how dynamic widget content is rendered on your home screen. Each layout is JSON validated by Glance and tied to one widget size.

Widget sizes

SizeCanvasBest for
small170 × 170 ptSingle KPI, status, countdown, one thumbnail
medium364 × 170 ptHeadline strip, split row, calendar next event
large364 × 382 ptMulti-metric boards, feed digests, rich dashboards

Create a layout manually

  1. Open Layouts from the bottom navigation in the iOS app.
  2. Tap + and choose Layout, or tap Create Layout on the Layouts tab.
  3. Give your layout a name, pick a widget size, and paste or edit the layout JSON.
  4. Tap Save. Glance validates the JSON and derives the content schema automatically.

Minimal layout example

A small widget with a caption and hero stat. Dynamic fields use {{double_braces}}; static labels use plain strings.

{
  "id": "root",
  "type": "container",
  "layout": "vertical",
  "style": { "padding": 12, "spacing": 8 },
  "children": [
    {
      "id": "label",
      "type": "text",
      "binding": "Today's revenue",
      "style": { "fontSize": 12, "color": "#8E8E93", "maxLines": 1 }
    },
    {
      "id": "value",
      "type": "stat",
      "value": "{{revenue}}",
      "style": { "valueFontSize": 28, "color": "#000000" }
    }
  ]
}

Learn the layout language

Live preview in the app uses the same Swift renderer as your home screen widget.