Assign multiple roles simultaneously to a component

I have a lot of labels which I’d like to style differently from one another. Specifically with fields like border-radius and padding.

The only way I can see to provide these values is via assigning a role that applies a specific style in CSS. That works, but I’d need one role for every single combination of values, which is cumbersome to add.

Is there a way to assign multiple roles simultaneously to a component? (There was a previous question asking about multiple roles per component but they were only wanting to switch roles rather than have many apply at once.)

From the ui you can assign one role only, from code you can assign a list of roles (a list of strings), and it will work just like assigning multiple classes in css.

2 Likes

Oh that’s super convenient since I’m working from the code in any case. Thank you!