Elements are the things a widget draws. Each is an object in the elements array, drawn in order (later ones on top).
| Field |
Type |
Default |
Description |
type |
"text", "image", "shape", "progress" |
"text" |
What to draw |
offset |
[x, y] |
[0, 0] |
Position relative to the widget’s anchor, in screen heights. Positive y is down. |
alignment |
"center", "leading", "trailing" |
"center" |
Which part of the element sits on its position horizontally. Vertically it’s always centered. |
color |
color |
#FFFFFF |
Text color, progress fill or line color. See each type. |
opacity |
number 0–1 |
1 |
Transparency of the whole element |
shadow |
boolean |
true |
Soft dark shadow for readability |
visibleWhen |
string |
|
"option=value" or "{token}". See Showing and hiding elements. |
{ "text": "{weekday|upper}", "font": { "family": "Michroma", "size": 0.05 }, "tracking": 0.42 }
| Field |
Type |
Required |
Default |
Description |
text |
string |
yes |
|
Text with tokens |
font |
font |
no |
system font, size 0.02 |
|
tracking |
number |
no |
0 |
Letter spacing in ems; negative tightens |
hideWhenEmpty |
boolean |
no |
false |
Hide while every token in text is empty |
The text color is color, replaced by the person’s color if they pick one. Text is a single line and doesn’t wrap.
| Field |
Type |
Required |
Default |
Description |
size |
number |
yes |
|
Text size in screen heights |
family |
string |
no |
system font |
Family name: "Michroma", an installed font, or one in the package’s fonts/ folder. Missing fonts fall back to the system font. |
weight |
string |
no |
"regular" |
ultraLight, thin, light, regular, medium, semibold, bold, heavy, black |
{ "type": "image", "src": "images/note.svg", "size": [0.026, 0.026], "tint": "#FF4F8B" }
| Field |
Type |
Required |
Default |
Description |
src |
string |
yes |
|
Path inside the package. PNG, JPEG, HEIC, GIF (first frame), PDF, SVG. |
size |
[w, h] |
yes |
|
The box the image fits in, without stretching |
tint |
color |
no |
|
Fill the image’s shape with this color. Replaced by the person’s color. |
cornerRadius |
number |
no |
0 |
Round the corners |
Requires a package. See Images.
{ "type": "shape", "shape": "rect", "size": [0.26, 0.15], "cornerRadius": 0.025, "fill": "#00000059", "shadow": false }
| Field |
Type |
Required |
Default |
Description |
size |
[w, h] |
yes |
|
|
shape |
"rect", "circle", "line" |
no |
"rect" |
circle is an ellipse filling size; line is horizontal, size[0] long |
fill |
color |
no |
color or white; none if stroke is set |
Inside color (not used by lines) |
stroke |
color |
no |
none (lines: color or white) |
Outline color |
strokeWidth |
number |
no |
0.002 (lines: size[1]) |
Outline thickness |
cornerRadius |
number |
no |
0 |
rect only; capped at half the shorter side |
Shapes keep their colors when the person picks a color. See Shapes.
{ "type": "progress", "style": "ring", "value": "{battery.level}", "size": [0.09, 0.09], "lineWidth": 0.007 }
| Field |
Type |
Required |
Default |
Description |
value |
string |
yes |
|
A number 0–1, or tokens that give one. Values ending in % are divided by 100. Non-numbers count as 0. |
size |
[w, h] |
yes |
|
|
style |
"bar", "ring" |
no |
"bar" |
Bars fill left to right; rings fill clockwise from the top |
lineWidth |
number |
no |
bar: size[1]; ring: 0.006 |
Thickness |
color |
color |
no |
white (or fill) |
The filled part. Replaced by the person’s color. |
track |
color |
no |
#FFFFFF40 |
The unfilled part |
See Progress bars and rings.
| Element |
Changes |
Keeps |
| Text |
color |
|
| Image |
tint (only if set) |
untinted images |
| Shape |
|
fill, stroke |
| Progress |
color (the fill) |
track |