Skip to main content
Answered

How to get ICONs to add icons to bottomBar web plugins


I am embedding  icons to Miro Board using bottomBar extension, i am able to add Circle icon but i want to add help icon ,  book icons and other icons.

Please let me know how to get the html of icons.   

Best answer by Anthony Roux

Hi @janardhan ,

 

You can directly add the icon file (svg for example) into your project and load the icon from a file. A quick example of this in Javascript will be to add your icons into a folder in your project and to load them using:

 

import icon from "path_to_icon/icon.svg";

miro.onReady(() => {
  miro.initialize({
    extensionPoints: {
      toolbar: {
        title: "Example",
        toolbarSvgIcon: icon,
        librarySvgIcon: icon,
        async onClick() {
          await miro.board.ui.openLibrary("content.html", { title: "Example" });
        },
      },
    },
  });
});

 

Regards,

Anthony

View original
Was it helpful?
This topic has been closed for comments

2 replies

Robert Johnson
Forum|alt.badge.img+13
  • Volunteer Community Moderator
  • 7275 replies
  • April 19, 2021

@janardhan - I am assuming that you were referring to bottomBar and using the Miro Developer Platform, so I renamed “bootomBar” to “bottomBar” and moved this post to the Developer Platform and APIs category.

 

 


Anthony Roux
Mironeer
Forum|alt.badge.img+1
  • Mironeer
  • 215 replies
  • Answer
  • May 10, 2021

Hi @janardhan ,

 

You can directly add the icon file (svg for example) into your project and load the icon from a file. A quick example of this in Javascript will be to add your icons into a folder in your project and to load them using:

 

import icon from "path_to_icon/icon.svg";

miro.onReady(() => {
  miro.initialize({
    extensionPoints: {
      toolbar: {
        title: "Example",
        toolbarSvgIcon: icon,
        librarySvgIcon: icon,
        async onClick() {
          await miro.board.ui.openLibrary("content.html", { title: "Example" });
        },
      },
    },
  });
});

 

Regards,

Anthony