How to add a button to a custom node similar to the Inject node?

I thought that my node would automatically have a button to its left end by giving it no input port. But it turns out that it just becomes non-interactable.

How to make it interactable like Inject?

As soon as you have a template, you already got the solution ... by checking the source code:

You may add a button by defining a button property in the nodes registerType function (html file) ... like it's done for the inject node.

1 Like

Also covered in the docs here Node appearance : Node-RED

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.