svelte-web-blocks
Home
Quick Start
Example 1
Example 2
Example 3
Example 4
JSON to Blocks Example
This example demonstrates how to convert JSON structures into Blockly blocks.
JSON Input
[ { "type": "document", "properties": { "title": "My Web Page", "theme": "light" }, "children": [ { "type": "featureCards", "properties": { "title": "Our Features", "columns": 3, "backgroundColor": null }, "children": [ { "type": "featureCard", "properties": { "icon": "🚀", "title": "Fast and Reliable", "description": "Our platform is optimized for speed and uptime." } }, { "type": "featureCard", "properties": { "icon": "💡", "title": "Intuitive Design", "description": "User-friendly interface that anyone can use." } }, { "type": "featureCard", "properties": { "icon": "⚙️", "title": "Powerful Features", "description": "Advanced capabilities to meet all your needs." } } ] } ] } ]
Load Blocks from JSON