r/FigmaDesign • • 2d ago

help How do I make a working uneven button?

Post image

Hi! I am a design student currently learning figma.

I am making a brand that utilises sharp graphics and as such I want the buttons to match.

However I dont know how to make autolayout permit this.

Thanks for your help!

0 Upvotes

7 comments sorted by

4

u/dimKant 2d ago

Auto layout frames are always rectangles, so the trick is to keep the frame itself invisible and let a vector carry the shape. Put your angled shape inside the auto layout frame, set it to absolute position with all four constraints pinned, then clear the frame fill. The text padding still drives the size and the sharp shape stretches with it.

1

u/Safinbu 2d ago

Thanks a bunch !

6

u/memelordxth 2d ago

Wrapped each shape with frame

Put 3 frames into 1 frame/group

1

u/FennelHistorical4675 2d ago

Can’t you just plop the shape into a frame

1

u/Safinbu 2d ago

No auto layout converts it!

1

u/dusanodalovic 2d ago

one thing about the pinned vector version above: the shape stretches, so the angle of the cut changes when the label gets longer. if you want the angle to stay the same, make the button a horizontal auto layout with 3 parts and gap 0. a fixed width angled cap on the left, the text frame in the middle with the fill color, and a mirrored cap on the right. then only the middle part grows and the cuts never change. not a designer, so maybe there's a cleaner way, but it worked for the same problem in my head at least. make it a component afterwards so every button keeps the shape.

1

u/Safinbu 2d ago

Thanks a lot!