Create custom inputs
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
Creating a custom input involves subclassing Blockly.inputs.Input or one of its subclasses.
Custom inputs can optionally have a connection created using the makeConnection method in the constructor.
Custom inputs need to be registered with a string identifier to be used in JSON block definitions.
To create a custom input, you need to subclass Input, or one of
its subclasses.
classMyInputextendsBlockly.inputs.Input{// The constructor should always take in a name and a block to be compatible// with JSON block definitions.constructor(name,block){super(name,block);// etc...}}
Optionally create a connection
If you want your input to have a connection, that should be created in the
constructor, by calling the makeConnection method.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-14 UTC."],[],["To create a custom input, subclass the `Input` class, including a constructor that accepts a name and block. Optionally, create a connection within the constructor using the `makeConnection` method. To use the custom input in JSON block definitions, register it with `Blockly.registry.register`, associating it with a unique string. Note that unlike custom fields, built-in inputs cannot be overridden and do not accept custom JSON configurations.\n"]]