Skip to main content

Define a flyout toolbox

A flyout toolbox has a single set of blocks that are displayed at all times.

A workspace with a flyout toolbox containing two
blocks.

To create a flyout toolbox, pass JSON or XML describing the toolbox to the toolbox property of the configuration options.

var toolbox = {
"kind": "flyoutToolbox",
"contents": [
{
"kind": "block",
"type": "controls_if"
},
{
"kind": "block",
"type": "controls_whileUntil"
}
]
};
var workspace = Blockly.inject('blocklyDiv', {toolbox: toolbox});