ProgressBar data
A thin bar along the top that fills as the video plays.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| color | color | "accent2" | |
| h | number (4 to 60) | 14 | |
| track | color | "rgba(255,255,255,.3)" |
* 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 |
| fill | shape |
Example#
{"el": "ProgressBar"}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": 1080,
"h": "$h",
"fill": "$track",
"align": "start",
"children": [
{
"el": "shape",
"id": "fill",
"kind": "rect",
"w": 1080,
"h": "$h",
"fill": "$color",
"origin": "left",
"motion": [{"do": "drive", "pose": {"scaleX": "=t/dur"}}]
}
]
}