PointsCard data
A card with a title and numbered points that arrive one after another.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| items* | list of string | ||
| title | string | "" | |
| each | number (0 to 3) | 0.45 | |
| w | number (300 to 1040) | 840 | |
| fill | color | overrides the surface's fill | |
| ink | color | "ink" | |
| accent | color | "accent" | |
| radius | number (0 to 200) | overrides the surface's corner |
* 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 |
| title | text |
| number | box |
| point | text |
Example#
{
"el": "PointsCard",
"title": "In one take",
"items": ["Cut the pauses", "Add captions", "Post it"]
}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",
"w": "$w",
"fill": "$fill",
"radius": "$radius",
"pad": 48,
"gap": 30,
"align": "start",
"motion": [{"do": "enter", "from": {"y": 120, "opacity": 0}, "curve": "heavy"}],
"children": [
{"el": "text", "id": "title", "text": "$title", "size": 56, "weight": 800, "color": "$ink"},
{
"el": "box",
"gap": 24,
"align": "start",
"motion": [
{
"do": "stagger",
"each": "$each",
"delay": 0.3,
"motion": [{"do": "enter", "from": {"x": -50, "opacity": 0}, "curve": "punchy"}]
}
],
"children": [
{
"$each": "$items",
"node": {
"el": "box",
"dir": "row",
"gap": 24,
"align": "center",
"children": [
{
"el": "box",
"id": "number",
"dir": "stack",
"w": 68,
"h": 68,
"radius": 999,
"fill": "$accent",
"children": [
{
"el": "text",
"text": "{index+1}",
"size": 36,
"weight": 800,
"color": "white"
}
]
},
{
"el": "text",
"id": "point",
"text": "$item",
"size": 46,
"weight": 600,
"color": "$ink",
"maxW": "=w-200"
}
]
}
}
]
}
]
}