Masks for buttons with text and auto layout

Hi everyone,

I want to create a button that can easily change it’s colour, size and text.

For the colour I could use masking, for the size I could use auto layout.
However, I was wondering if there is an option to have both.

A button that gets automatically longer if the text gets longer.
Yet still changes the colour. Does anyone know if it’s possible to combine those two functions?

1 Like

Just curious, instead of a mask to change colors, why not just use color styles and/or variants for easy swapping? This would let you combine auto layout and color.

Actually, this could be it. Thanks!
It, unfortunately, also means redesigning a complete file but I think in this case it makes sense. Will reach out again if I fail somewhere. Thanks so much mate!