Skip to main content

BlockSpec

NameTypeRequiredDescriptionExample
onCanvasbooleanWhether the block is rendered on the canvas. Otherwise, it must be dragged into another block.
true
colorstringThe color of the block
#FF5733
iconIconNameThe icon to be displayed on the block
IconName.ArrowRight
extrasExtra[]The extra features of the block
[Extra.Collapsible]
connectionsRecord<Position,{direction: ConnectionDirection, allowed: string[]}>The allowed connections for the block
{ top: { direction: ConnectionDirection.Up, allowed: ['state'] } }
hideNewPrefixbooleanWhether to hide the 'New' prefix in newly spawned blocks
true
minifiedbooleanWhether the block utilizes a minified footprint
true
styleobjectStyle overrides for the block
{ width: 100, height: 100 }