Phone data
A phone around whatever it wraps. The content is clipped to the screen; give a wide component scale: 0.55 to fit it in.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| w | number (300 to 900) | 580 | |
| h | number (500 to 1800) | 1180 | |
| fill | color | "paper" |
* 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 |
| screen | box |
Content it wraps#
It wraps whatever is written in its children.
Example#
{"el": "Phone", "children": []}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",
"h": "$h",
"radius": 88,
"fill": "#0a0a0e",
"pad": 16,
"shadow": 3,
"children": [
{
"el": "box",
"id": "screen",
"dir": "stack",
"grow": true,
"w": "fill",
"radius": 72,
"clip": true,
"fill": "$fill",
"children": [
"$children",
{"el": "box", "place": [0.5, 0.035], "w": 170, "h": 38, "radius": 19, "fill": "#0a0a0e"}
]
}
]
}