SlabLabel data
A sticker-style label: bold words on a coloured slab with a black outline and a hard shadow.
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| text* | string | ||
| size | number (20 to 300) | 64 | |
| fill | color | "accent2" | |
| ink | color | "black" | |
| tilt | number (-30 to 30) | 0 | |
| font | enum: display | body | mono | serif | "display" |
* 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 |
| slab | box |
| words | text |
Example#
{"el": "SlabLabel", "text": "Where do you host 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": "slab",
"fill": "$fill",
"border": "$ink",
"borderW": 5,
"hard": 9,
"pad": [14, 32],
"rotate": "$tilt",
"motion": [{"do": "enter", "from": {"scale": 0.5, "opacity": 0, "rotate": -8}, "curve": "bouncy"}],
"children": [
{
"el": "text",
"id": "words",
"text": "$text",
"size": "$size",
"weight": 800,
"font": "$font",
"color": "$ink",
"align": "center",
"maxW": 820
}
]
}