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
| Size | Canvas | Best for |
|---|---|---|
| small | 170 × 170 pt | Single KPI, status, countdown, one thumbnail |
| medium | 364 × 170 pt | Headline strip, split row, calendar next event |
| large | 364 × 382 pt | Multi-metric boards, feed digests, rich dashboards |
Create a layout manually
- Open Layouts from the bottom navigation in the iOS app.
- Tap + and choose Layout, or tap Create Layout on the Layouts tab.
- Give your layout a name, pick a widget size, and paste or edit the layout JSON.
- 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
- Design System — principles, canvas, bindings, typography
- Components — all 19 v1 component types
- Golden Examples — reference layouts for each size
Live preview in the app uses the same Swift renderer as your home screen widget.