FlashLabels data
Feature names flashed one at a time, about a second each, under a small tag such as NEW.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| items* | list of string | ||
| tag | string | "New" | |
| hold | number (0.3 to 10) | 0.95 | |
| size | number (40 to 400) | 150 | |
| ink | color | "ink" | |
| accent | color | "accent" |
* 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 |
| name | text |
Example#
{"el": "FlashLabels", "items": ["Cuts", "Captions", "Motion", "Posting"]}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",
"local": true,
"gap": "=size*0.16",
"align": "center",
"children": [
{
"el": "box",
"surface": "chip",
"pad": [10, 26],
"fill": "$accent",
"children": [
{
"el": "text",
"text": "$tag",
"size": "=size*0.24",
"weight": 700,
"font": "mono",
"color": "onAccent",
"upper": true,
"tracking": 0.14
}
]
},
{
"el": "box",
"dir": "stack",
"children": [
{
"$each": "$items",
"node": {
"el": "text",
"id": "name",
"text": "$item",
"size": "$size",
"weight": 800,
"color": "$ink",
"align": "center",
"motion": {
"$if": "=index<count-1",
"then": [
{"do": "during", "at": "=index*hold", "until": "=(index+1)*hold"},
{
"do": "enter",
"from": {"y": 44, "opacity": 0, "blur": 6},
"at": "=index*hold",
"curve": "punchy"
},
{
"do": "exit",
"to": {"y": -44, "opacity": 0},
"at": "=(index+1)*hold-0.18",
"curve": {"ease": "in", "duration": 0.18}
}
],
"else": [
{
"do": "enter",
"from": {"y": 44, "opacity": 0, "blur": 6},
"at": "=index*hold",
"curve": "punchy"
}
]
}
}
}
]
}
]
}