Picture data
One of the reel's pictures on a small card over the speaker, with a caption under it. Give the picture's id.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| src* | string | ||
| caption | string | "" | |
| ratio | number (0.2 to 5) | 1.5 | |
| ink | color | "ink" | |
| w | number (80 to 1000) | 520 |
* 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 |
| card | box |
| picture | img |
| caption | text |
Example#
{"el": "Picture", "src": "", "caption": "the dashboard"}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": "card",
"surface": "card",
"pad": 14,
"gap": 12,
"align": "center",
"motion": [{"do": "enter", "from": {"y": 80, "rotate": 4, "opacity": 0}, "curve": "punchy"}],
"children": [
{
"el": "img",
"id": "picture",
"src": "$src",
"w": "=min(w, 320*ratio)",
"h": "=min(w, 320*ratio)/ratio",
"radius": 16,
"fit": "cover"
},
{
"el": "text",
"id": "caption",
"text": "$caption",
"size": 36,
"weight": 700,
"color": "$ink",
"align": "center",
"maxW": "$w"
}
]
}