Checklist data
Rows that tick themselves one by one: the tick is drawn, the words slide in.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| items* | list of string | ||
| each | number (0 to 2) | 0.4 | |
| size | number (34 to 140) | 76 | |
| color | color | "good" |
* required. Every node also takes the common props: id, motion, start, place, scale, rotate, opacity, w, h. A colour is a palette name, never a value.
Parts#
Named parts can be restyled from outside without making a new component: "parts": { "root": { … } }.
| Part | Is a |
|---|---|
| root | box |
| tick | box |
| text | text |
Example#
{"el": "Checklist", "items": ["Record once", "Pick a look", "Post it"]}How it is made#
This component is plain data. Its whole definition is the tree below: copy it into a scene's components list under a new name to make your own version. See Custom components.
{
"el": "box",
"gap": 36,
"align": "start",
"motion": [{"do": "stagger", "each": "$each"}],
"children": [
{
"$each": "$items",
"node": {
"el": "box",
"dir": "row",
"gap": 30,
"align": "center",
"children": [
{
"el": "box",
"id": "tick",
"dir": "stack",
"w": "=size*1.3",
"h": "=size*1.3",
"radius": 999,
"fill": "$color",
"motion": [{"do": "enter", "from": "pop", "curve": "bouncy"}],
"children": [
{
"el": "shape",
"kind": "check",
"w": "=size*0.72",
"h": "=size*0.72",
"stroke": "white",
"strokeW": 3.4,
"motion": [{"do": "draw", "delay": 0.18, "curve": "snap"}]
}
]
},
{
"el": "text",
"id": "text",
"text": "$item",
"size": "$size",
"weight": 700,
"maxW": 760,
"motion": [
{
"do": "enter",
"from": {"x": -50, "opacity": 0},
"delay": 0.08,
"curve": "punchy"
}
]
}
]
}
}
]
}