MomentList data
A full-frame list: a title, then numbered cards that arrive one after another. For the three or four things the speaker is counting off.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| items* | list of string | ||
| title | string | "" | |
| each | number (0 to 4) | 0.5 | |
| ink | color | "ink" | |
| on | string | "page" | the surface it sits on |
| frameW | number | its width, when it is not the whole frame | |
| frameH | number | its height, when it is not the whole frame |
* 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 |
| page | box |
| title | text |
| row | box |
| number | box |
| point | text |
Example#
{
"el": "MomentList",
"title": "In one take",
"items": ["Cut the pauses", "Caption every word", "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",
"id": "page",
"surface": "$on",
"w": "$frameW",
"h": "$frameH",
"gap": 50,
"align": "center",
"justify": "center",
"motion": [{"do": "enter", "from": {"opacity": 0, "scale": 1.05}, "curve": "smooth"}],
"children": [
{
"el": "text",
"id": "title",
"text": "$title",
"size": "=frameW*0.074",
"weight": 800,
"color": "$ink",
"align": "center",
"maxW": "=frameW-180",
"motion": [
{
"do": "enter",
"from": {"y": 36, "opacity": 0, "blur": 6},
"delay": 0,
"curve": "smooth"
}
]
},
{
"el": "box",
"gap": 26,
"align": "start",
"motion": [
{
"do": "stagger",
"each": "$each",
"delay": 0.35,
"motion": [{"do": "enter", "from": {"x": -70, "opacity": 0}, "curve": "punchy"}]
}
],
"children": [
{
"$each": "$items",
"node": {
"el": "box",
"id": "row",
"surface": "card",
"dir": "row",
"gap": 28,
"align": "center",
"justify": "start",
"w": "=frameW-180",
"pad": [26, 34],
"children": [
{
"el": "box",
"id": "number",
"dir": "stack",
"w": 76,
"h": 76,
"radius": 999,
"fill": "accent",
"children": [
{
"el": "text",
"text": "{index+1}",
"size": 40,
"weight": 800,
"color": "white"
}
]
},
{
"el": "text",
"id": "point",
"text": "$item",
"size": "=frameW*0.046",
"weight": 700,
"color": "$ink",
"maxW": "=frameW-420"
}
]
}
}
]
}
]
}