Web Plugin: is it possible to add a button to the left side bar?

  • 20 March 2021
  • 1 reply


I’ve just finished building the simple Miro Web Plugin to count the number of widgets by type and would like to add a button on the sidebar which creates a sticky on the board with the count.

I tried adding the button to HTML using the code below but the button itself is not clickable, is this not supported on the sidebar? 

let button = document.createElement('button');
button.className = 'stat-list__button';
button.innerText = 'Create Totals';
button.addEventListener('click', function() {
}, false);

Thanks for the help!



Best answer by Max Harper 27 March 2021, 15:12

View original

1 reply

Userlevel 7
Badge +5


Take an example like this … (at its src/index.js)


And look at its index.js (which is setup here to define

-1) the UI (“icon24” SVG of icon)

-2) the location of that icon extensionPoints:{toolbar: {..}

-3)  the functionality (the callback passed to onClick.    In this case(and in many other apps who want to open Miro UI extension point like sidebar or library )  the callback is a Miro method for “[[yourExtensionPoint]]” ) , —> but I’ve seen it working where the callback to onClick is just another function lower in index.js and no html page has to be opened. The button just runs the rest of your operations there (count by type, create sticky(s)— in your case). Give that a try. 

Long story, short: 

index.js in that sample project above ... IS the toolbar button you seek. 


I recommend scouring through the examples here for a mixture of approaches.