Example
League table
Ten rows of a table, with every column lined up.
{
"v": 1,
"preferredFamily": "systemLarge",
"refresh": 3600,
"accessibility": "Premier League table after matchweek 8. Tottenham Hotspur are ninth with 11 points.",
"url": "https://football.example.com/premier-league/table",
"view": {
"type": "vstack",
"align": "leading",
"spacing": 8,
"padding": 14,
"bg": "#37003C",
"text": {"color": "white"},
"children": [
{
"type": "hstack",
"spacing": 6,
"children": [
{
"type": "symbol",
"name": "trophy.fill",
"style": "subheadline",
"color": "#E9C46A"
},
{"type": "text", "text": "Premier League", "style": "headline"},
{"type": "spacer"},
{
"type": "text",
"text": "Matchweek 8",
"style": "caption",
"color": "#B9A3C2"
}
]
},
{
"type": "grid",
"spacing": 7,
"rowSpacing": 1,
"rowPadding": {"top": 3, "bottom": 3, "leading": 2, "trailing": 6},
"text": {"style": "footnote", "lines": 1},
"columns": [
{},
{"align": "trailing", "text": {"monoDigits": true, "color": "#B9A3C2"}},
{"w": "fill"},
{"align": "trailing", "text": {"monoDigits": true}},
{"align": "trailing", "text": {"monoDigits": true}},
{"align": "trailing", "text": {"monoDigits": true}},
{"align": "trailing", "text": {"monoDigits": true}},
{"align": "trailing", "text": {"monoDigits": true}},
{"align": "trailing", "text": {"monoDigits": true, "weight": "bold"}}
],
"rows": [
{
"cells": [null, "#", "Team", "P", "W", "D", "L", "GD", "Pts"],
"text": {
"style": "caption2",
"weight": "semibold",
"color": "#B9A3C2"
}
},
[
{"type": "rect", "w": 3, "fill": "#3B82F6", "corner": 1.5},
"1",
"Arsenal",
"8",
"6",
"1",
"1",
"+11",
"19"
],
[
{"type": "rect", "w": 3, "fill": "#3B82F6", "corner": 1.5},
"2",
"Liverpool",
"8",
"6",
"1",
"1",
"+9",
"19"
],
[
{"type": "rect", "w": 3, "fill": "#3B82F6", "corner": 1.5},
"3",
"Manchester City",
"8",
"5",
"2",
"1",
"+8",
"17"
],
[
{"type": "rect", "w": 3, "fill": "#3B82F6", "corner": 1.5},
"4",
"Chelsea",
"8",
"4",
"3",
"1",
"+6",
"15"
],
[null, "5", "Aston Villa", "8", "4", "2", "2", "+3", "14"],
[null, "6", "Nottingham Forest", "8", "4", "2", "2", "+2", "14"],
[null, "7", "Brighton & Hove Albion", "8", "3", "4", "1", "+3", "13"],
[null, "8", "Newcastle United", "8", "3", "3", "2", "+1", "12"],
{
"cells": [
null,
"9",
"Tottenham Hotspur",
"8",
"3",
"2",
"3",
"+4",
"11"
],
"bg": "white/12",
"corner": 6,
"text": {"weight": "semibold"}
},
[null, "10", "AFC Bournemouth", "8", "3", "2", "3", "0", "11"]
]
}
]
}
} How it works
The table is a grid. Each column is as wide as its widest cell, so the header aligns with the numbers and the payload sets no widths.
Most cells are plain strings. A string cell is a text node that takes its style from the grid's text, then its column's, then its row's. The numeric columns are trailing-aligned with equal-width digits, the header row is smaller and dimmer, and your team's row is semibold.
A rect four points wide in the first column marks the Champions League places. A shape stretches across its row, so each bar is as tall as its row. Your team's row has a bg and a corner. A row background spans the whole grid.
The team column takes the remaining width and has lines: 1. On a smaller phone, or with larger text, Brighton's full name is truncated first and the numbers stay in place.
Put it on your Home Screen
We serve this example at the URL below. The server generates the timestamps at the time of each request. Add the URL as a hook in the app, and the widget works on your phone.
https://webhookwidget.com/demo/standings Next
Habit grid: Five weeks of history, built from stacks.
All examples