Terminal data
A dark terminal window that types its lines one after another.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| lines* | list of string | ||
| title | string | "zsh" | |
| each | number (0 to 5) | 0.8 | seconds between lines |
| cps | number (4 to 200) | 38 | characters typed per second |
| w | number (300 to 1060) | 900 | |
| size | number (34 to 80) | 36 |
* 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 | text |
Example#
{"el": "Terminal", "lines": ["reelify cut talk.mp4", "captions: done", "posted in 4 min"]}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",
"w": "$w",
"radius": 32,
"fill": "#0d1017",
"clip": true,
"shadow": 3,
"children": [
{
"el": "box",
"dir": "row",
"h": 80,
"pad": [0, 28],
"gap": 12,
"align": "center",
"fill": "#171b26",
"children": [
{"el": "shape", "kind": "circle", "w": 18, "fill": "#ff5f57"},
{"el": "shape", "kind": "circle", "w": 18, "fill": "#febc2e"},
{"el": "shape", "kind": "circle", "w": 18, "fill": "#28c840"},
{
"el": "text",
"text": "$title",
"font": "mono",
"size": 34,
"weight": 500,
"color": "#7d8597"
}
]
},
{
"el": "box",
"pad": 36,
"gap": 20,
"align": "start",
"motion": [{"do": "stagger", "each": "$each"}],
"children": [
{
"$each": "$lines",
"as": "l",
"node": {
"el": "box",
"dir": "row",
"gap": 16,
"align": "start",
"children": [
{
"el": "text",
"text": "›",
"font": "mono",
"size": "$size",
"weight": 700,
"color": "#28c840",
"motion": [{"do": "enter", "from": "fade"}]
},
{
"el": "text",
"id": "line",
"text": "$l",
"font": "mono",
"size": "$size",
"weight": 500,
"color": "#e6e9f0",
"motion": [{"do": "type", "cps": "$cps"}]
}
]
}
}
]
}
]
}