FileGrid data
A grid of file tiles where different ones light up in turn: "any kind of file".
Props#
| Prop | Type | Default | Notes |
|---|---|---|---|
| icons | list of string | ["play","music","chat","star","mic","search","bell","heart"] | |
| rows | number (1 to 12) | 4 | |
| size | number (20 to 300) | 96 | |
| accent | color | "accent" |
* 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 |
Example#
{"el": "FileGrid"}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",
"gap": 16,
"motion": [{"do": "enter", "from": {"scale": 0.9, "opacity": 0}, "curve": "heavy"}],
"children": [
{
"$each": "$rows",
"as": "r",
"node": {
"el": "box",
"dir": "row",
"gap": 16,
"children": [
{
"$each": "$icons",
"node": {
"el": "box",
"dir": "stack",
"w": "$size",
"h": "$size",
"radius": "=size*0.2",
"border": "rgba(128,128,140,.3)",
"borderW": 2,
"fill": {
"mix": [
"rgba(128,128,140,.06)",
"$accent",
"=bell((mod(t*0.9+rand(index,r)*7,3.2)-0.5)*3)"
]
},
"children": [
{
"el": "icon",
"name": "$item",
"size": "=size*0.42",
"color": "white",
"opacity": 0.8
}
]
}
}
]
}
}
]
}