How to change glyphicons colour Native app

0
Hi, i’m adding some glyphicons to my native app and I was wondering if someone could give me some direction on how I can change the icon colour?
asked
2 answers
1

Hi Gareth,

If you are adding your own custom SVG icons these are the steps:

  1. Open the svg file in your favorite IDE like Visual Studio Code, remove all the ‘fill=”...”’ properties and save your file
  2. Now add the SVG to your image collection
  3. Create a class in your JS stylesheet like so
    • export const myCustomIcon = {
          container: {
              backgroundColor: "transparant", 
          }, 
          image: { 
              fill: darkMode ? "#fff" : "#333" //Place your desired HEX codes here 
          } 
      }

       

  4. When using your icon on a page, give it a class which corresponds with your stylesheet

Good luck!

 

-- EDIT – If you are using default Mendix icons, you can skip step 1 and 2 as these al already colorless.

answered
0

This is how I’m using the glyphicon;

 

answered