Store icons in the database ☯

Would be great to store icon’s in the database, so when you are showing data in a rep. group you can also show the icon you added to the entry.

2 Likes

you can, as image :slight_smile:

1 Like

could also do this as text I believe if you wanted to use an svg icon. then just make the content in the html element dynamic.

or if you have font awesome just use a text field and store [fa]example[/fa]

Yep, we’re doing that in one of our apps.

You can download all the icon images that Bubble uses from Google, and pick the format and resolution you need, then upload to your DB.

https://material.io/icons/

2 Likes

Hi

Have searched the forum but can’t find the answer - is there anyway to store the “native bubble icons” in the database somehow?

Or can icons only be stored in the database through downloading and using images? The problem with images is that it doesn’t then allow for dynamic colouring, as is possible if text is used instead.

As an example - I have a menu like the attached and would like to be able to do this as a repeating group, but I need to store the icons (along with the respective hex code to determine the icon colour dynamically) in the database instead in order to allow for this.

Many thanks in advance!

Menu item like a text would be a solution ? Like [color=#dynamic-hexa-here][fa]dynamic-icon-name-here[/fa][/color] ? You can choose to store it or not, as you like

ah great thanks - will try that!

1 Like

@vladlarin - thanks for the material ions download tip. Any way to apply a color to those without using a plugin? Google only lets you download black or white versions of those icons. Thanks in advance!!

UPDATE: found this:

Hey guys

I was struggling as well with saving coloured icons to the database, here’s how worked it out:

  1. Download the desired icon in .SVG from Material Design (Unfortunately they can only be downloaded in Black or White)

  2. Open the icon in canva.com (free version) to edit the color:

  3. Edit the colour

  4. Save in transparent PNG

  5. Upload to bubble (in my case to an Option Set attribute, to use in a repeating group):