Headline data
A line on a coloured slab, slightly tilted, that wipes in; the words follow one by one and the marked ones take the second colour.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| text* | string | ||
| mark | string | "" | |
| size | number (34 to 240) | 80 | |
| fill | color | overrides the surface's fill | |
| ink | color | "white" | |
| markColor | color | "accent2" | |
| radius | number (0 to 200) | overrides the surface's corner | |
| tilt | number (-20 to 20) | -2 | |
| w | number (200 to 1040) | 880 |
* 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 |
| slab | box |
| line | text |
Example#
{"el": "Headline", "text": "What nobody tells you", "mark": "nobody"}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": "slab",
"surface": "slab",
"fill": "$fill",
"radius": "$radius",
"rotate": "$tilt",
"motion": [{"do": "enter", "from": "wipe-right", "curve": "snap"}],
"children": [
{
"el": "text",
"id": "line",
"text": "$text",
"size": "$size",
"weight": 800,
"leading": 1.05,
"color": "$ink",
"align": "center",
"maxW": "$w",
"split": "word",
"mark": "$mark",
"markColor": "$markColor",
"motion": [
{
"do": "stagger",
"each": 0.06,
"delay": 0.12,
"motion": [{"do": "enter", "from": {"y": 40, "opacity": 0}, "curve": "punchy"}]
}
]
}
]
}