NodeBox data
A box in a diagram: an icon and a name, outlined, with a hard shadow.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| label* | string | ||
| icon | string | "star" | |
| fill | color | "paper" | |
| ink | color | "black" | |
| w | number (80 to 1000) | 280 |
* 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 |
| node | box |
Example#
{"el": "NodeBox", "label": "your app"}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": "node",
"w": "$w",
"fill": "$fill",
"border": "$ink",
"borderW": 5,
"hard": 8,
"pad": [26, 20],
"gap": 10,
"align": "center",
"motion": [{"do": "enter", "from": "pop", "curve": "bouncy"}],
"children": [
{"el": "icon", "name": "$icon", "size": 64, "color": "$ink", "strokeW": 2.2},
{
"el": "text",
"text": "$label",
"size": 34,
"weight": 700,
"font": "mono",
"color": "$ink",
"align": "center"
}
]
}