Can I Send an Icon Inside a Reusable Element?

Is there a way to set the icon displayed inside a reusable element from the outside without creating a million conditionals?

In other words, can I put an icon inside the RE, then use a property for the RE to dictate which icon is displayed?

Did you try Reusable elements ‘Property’?

That’s how I’ve been doing it up to now, but it’s a silly approach as you use more icons.

I had so many conditionals that I had to split them into new REs just to make it readable.

IF element’s Icon property is “Message” icon = messageicon

I wondered if there was a way to access the icon directly in the property and just have bubble read that?

You can try Feather Icons plugin by Airdev. They let you set the icons dynamically. So you can have a property for icon name and another for icon message. Then display both accordingly.

You can also use option set to make it even easier.

Thank you kindly, I am looking into this now. I can see that icons can be set dynamically, which is a great start.

Do you mean using an option set by adding each icon type to the list?

If you are using Feather Icons, just the icon name will be enough like ‘message-circle’ etc.

But you can add image as well. That will act like your own custom icon.

I’ve got it working, thank you.

This seems to be a good solution, though there’s a LOT of icons in this pack and adding them all to an option set one-by-one might be a time-consuming process!

Think I’ll have to do some cherry picking!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.