StreamText data
Text that arrives the way an answer streams: word by word out of a blur. Marked words are underlined in the accent colour.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| text* | string | ||
| mark | string | "" | |
| size | number (20 to 300) | 44 | |
| color | color | "ink" | |
| font | enum: display | body | mono | serif | "body" | |
| weight | number (100 to 900) | 450 | |
| each | number (0 to 1) | 0.055 | |
| w | number (100 to 1900) | 900 | |
| delay | number (0 to 60) | 0 |
* 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 | text |
Example#
{
"el": "StreamText",
"text": "Fireflies glow because they make their own light.",
"mark": "light."
}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": "text",
"text": "$text",
"size": "$size",
"weight": "$weight",
"font": "$font",
"color": "$color",
"maxW": "$w",
"leading": 1.4,
"split": "word",
"mark": "$mark",
"markStyle": "underline",
"markColor": "accent",
"motion": [
{
"do": "stagger",
"each": "$each",
"delay": "$delay",
"motion": [
{
"do": "enter",
"from": {"opacity": 0, "blur": 12},
"curve": {"ease": "out", "duration": 0.5}
}
]
}
]
}