MomentTitle data
A full-frame title card: a small kicker, then one big line that arrives word by word with a phrase marked.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| title* | string | ||
| kicker | string | "" | |
| mark | string | "" | |
| 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 |
| kicker | text |
| title | KineticLine |
| rule | shape |
Example#
{
"el": "MomentTitle",
"kicker": "Lesson one",
"title": "Record once, post all week",
"mark": "all week"
}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": 56,
"align": "center",
"justify": "center",
"motion": [{"do": "enter", "from": {"opacity": 0, "scale": 1.05}, "curve": "smooth"}],
"children": [
{
"el": "text",
"id": "kicker",
"text": "$kicker",
"size": 42,
"weight": 600,
"font": "mono",
"color": "muted",
"upper": true,
"tracking": 0.14,
"motion": [
{
"do": "enter",
"from": {"y": 36, "opacity": 0, "blur": 6},
"delay": 0.1,
"curve": "smooth"
}
]
},
{
"el": "KineticLine",
"id": "title",
"text": "$title",
"mark": "$mark",
"color": "$ink",
"size": "=frameW*0.115",
"maxW": "=frameW-150"
},
{
"el": "shape",
"id": "rule",
"kind": "rect",
"w": "=frameW*0.22",
"h": 10,
"radius": 5,
"fill": "accent",
"origin": "left",
"motion": [{"do": "draw", "delay": 0.5, "curve": "snap"}]
}
]
}