Balsamiq Community Discussion

How do I create 50 buttons programmatically?


Hi, I need to create 50 buttons, each with different text. I don’t want to do it manually.

How can I do it programmatically? JSON? A macro perhaps?




Drag a button element onto the canvas. CTRL+D forty-nine times. Double-click every button and insert your text.

Not too sure you’re going to be able to execute JSON (or any other) commands within Balsamiq.

If there is a way to do it, I apologize in advance.



You could try editing the actual XML of the file in Balsamiqs 2 - I haven’t quite figured out how to get into the new BMPR file in Balsamiqs 3.

You could also leverage AutoHotkey or something in Windows to get around the use case.

I’m tempted to tell you that “you don’t really need 50 buttons to get your point across” - an array of buttons would be easier to communicate by selectively showing the relevant parts rather than the whole UI - especially in a low-fi tool like Balsamiqs.


We haven’t yet documented our JSON specification because it’s constantly evolving with some current work we’re doing on the app, but we will when it’s stable.

I would do as Ulrich_Schroeder suggests, maybe duplicate to make 10 and duplicate that set 4 times.

Or as Colin_Heics suggests, create a macro with a third party tool. On the Mac you could use Keyboard Maestro or similar to run this easily.