Question - Component to be width of text

I am making a simple pill component. I want to make sure the width of the background is same as the width of the text. How do I go about doing it? It seems the width is always fixed and I have to choose the value. I am sure I am doing something wrong.


Hi, unfortunately in React Studio there is no concept for text label which ”pushes” and resizes the component horizontally.

It’s actually quite complex thing because other components would then need to adapt to the size of the text. There could be confilcts also if the parent component has fixed width (e.g. If component is nested inside the columns element).