Skip to main content

I know how to create a standard button in Figma where you use a stroke around the text to make it expandable, but I'm having trouble with a custom shape button. Specifically, I want to create a button using a custom shape (like an ellipse) that will resize based on the text length.

I want the text and button to expand together, so the button adjusts automatically if the text changes or is longer. Is there a way to achieve this with Auto Layout, or is there a better approach for this kind of dynamic resizing with custom shapes?

Any help would be greatly appreciated!

Image 1 is my button
Image 2 is what currently happens if the text is longer  than the button

 

 Hi! You can do achieve a similar effect by using a combination of Auto layout and absolute positioning (“Ignore auto layout” button in the top right corner of the Position panel):

 

Set the desired paddings on the button, then add the ellipse

 

An ellipse set to ignore auto layout and manually stretched to occupy full width and height of the button

 

Constraints set to stretch horizontally and vertically (scale also works)

 

 


That worked great! Thank you so much for your help!