In the settings, there’s the option Expose the option to add an ID attribute to HTML elements.
It would be so useful to also have the option Expose the option to add Class attributes to HTML elements.
So many times I need to play with positioning/resizing behaviour of several elements (or anything else) and the only way is to give each elements a unique ID. Any web developer knows how important classes are. Somewhat it is not an option right now in Bubble.
**For those who really need to add classes to groups, I did manage to find a workaround using jQuery, but it’s complicated and not performance wise. Apply custom CSS class to elements?
@bubble @neerja can we get the engineering team to review this? I believe the concern was that Bubble could change class names without prior notice to the elements.
Instead of exposing the full class just as the ID does it would be useful to be able to append single or multiple classes with a prefix to elements.
This prefix could be set in the app settings and you could set a number of forbidden words like “bubble”.
In the app settings you select your prefix: myprefix
In the element you append classes: class1, class2, class3
This will convert into
<div class="bubble-element Group myprefix-class1 myprefix-class2 myprefix-class3"...></div>
While waiting for a true, native implementation, have a look to my new plugin, Classify.
It allows to do just that; adding custom classes to elements. It’s very easy to use.