Making buttons automatically resize based on text length in Figma

I need help with making responsive buttons that adjust their size automatically when I change the text content.

Right now I’m designing buttons that have a background color with text on top. The problem is that every time I update the text, I have to manually adjust the button width to fit the new content.

For example, if my button starts at 60px wide with “OK” as the text, but then I change it to “Submit your application now”, the button stays the same size and the text gets cut off or looks weird.

Is there a built-in feature or method to make the button container automatically expand or shrink to accommodate different text lengths? This would save me tons of time when creating variations of the same button design.

I’m looking for a solution that works within Figma’s design system so I don’t have to manually resize every single button variant.

Use auto-layout with proper constraints. Select your button background, turn on auto-layout in the right panel, then set your padding values. Make sure you disable ‘fill container width’ on your text layer so it can grow naturally. Once that’s set up, the button automatically adjusts when you edit the text. I learned this after manually resizing hundreds of buttons when I started using Figma - what a nightmare. Now I build all my button components with auto-layout from day one. The padding stays the same while the button width adapts to any text length.

Figma’s auto-layout containers are perfect for this. Just create a frame, add auto-layout, drop your text in, and it’ll resize automatically when you change the content.

Here’s the real game-changer though - automate the whole button creation process instead of doing it manually every time.

I set up workflows that generate button variants automatically based on different text inputs. Need 20 different button states with various labels? I just feed the text variations into the system and get perfectly sized buttons in seconds.

This is a lifesaver when you’re working with design systems that need constant updates. Skip manually creating each button variant in Figma - generate them programmatically and import them back.

I’ve used this for dashboard designs where button labels change based on user roles or app states. The automation handles sizing logic while keeping padding and styling consistent.

You can build these workflows easily with visual automation tools. Check out Latenode for design automation - it connects well with design tools and handles the repetitive work: https://latenode.com

Auto-layout components fix this for good. Make your button with auto-layout, then convert it to a component. Need different variations? Just create instances and change the text directly - they’ll inherit the auto-sizing from the master. I learned this on a big e-commerce project with dozens of button variations. One master component with proper auto-layout saved us weeks when the client wanted text changes everywhere. Get your padding and constraints right upfront, and every instance will keep consistent spacing while adapting to whatever text you throw at it.