HighlightLine data
A short line of the speaker's words with a highlighter swept across the phrase that matters.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| text* | string | ||
| mark | string | "" | |
| ink | color | "white" | |
| size | number (30 to 200) | 66 |
* 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 |
| line | box |
| words | text |
Example#
{"el": "HighlightLine", "text": "the edit is the easy part", "mark": "easy part"}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": "line",
"pad": [10, 20],
"motion": [{"do": "enter", "from": {"y": 30, "opacity": 0}, "curve": "punchy"}],
"children": [
{
"el": "text",
"id": "words",
"text": "$text",
"size": "$size",
"weight": 800,
"color": "$ink",
"align": "center",
"maxW": 900,
"leading": 1.2,
"split": "word",
"mark": "$mark",
"markStyle": "underline",
"markColor": "accent2",
"outline": "rgba(0,0,0,.55)",
"outlineW": 6,
"markMotion": [{"do": "to", "pose": {"scale": 1.06}, "delay": 0.35, "curve": "punchy"}],
"motion": [
{
"do": "stagger",
"each": 0.05,
"motion": [{"do": "enter", "from": {"y": 24, "opacity": 0}, "curve": "punchy"}]
}
]
}
]
}