Graphic Design

Figma Auto Layout for Beginners: How to Create a Perfect Button

Have you ever designed a beautiful button in Figma, only to have it completely fall apart the moment you change the text inside? You meticulously align a text layer with a background rectangle, but when "Buy Now" becomes "Add to Shopping Cart," your button stretches awkwardly or the text overflows. This common frustration plagues many beginners trying to create a robust Figma Auto Layout button that adapts to its content. But what if there was a way to make your buttons resize automatically, keeping their padding and structure intact? There is, and it's called Auto Layout.

The Problem: Why Your Buttons Break When You Change Text

Imagine you've created a simple button. You probably started by typing some text, like "Shop Now," then drew a rectangle behind it, carefully centering the text. It looks perfect, right? Now, try changing that text to something longer, like "Proceed to Checkout." What happens? The rectangle stays the same size, while your text either overflows, gets cut off, or forces you to manually resize the background rectangle and re-center the text. This manual adjustment is not only time-consuming but also prone to inconsistencies, especially when working on a large design system. This is why many designers struggle to create a truly responsive button in Figma.

(Imagine a GIF here: A text layer "Buy" is perfectly centered on a rectangle. The text is then changed to "Add to Shopping Cart," and the rectangle remains the same size, causing the text to overflow the rectangle's boundaries.)

The Solution: Introducing Auto Layout (Shift + A)

Figma's Auto Layout feature is a game-changer for creating dynamic and adaptable UI elements, especially buttons. Think of Auto Layout as a smart container that automatically adjusts its size based on the content inside it. When you add or remove items, or change the text length, the container—and thus your button—will intelligently grow or shrink to accommodate those changes, maintaining consistent spacing and padding. It's the key to making a truly flexible Figma Auto Layout button.

As a designer might think, "What do I need to do to create a button now? ... I've added Auto Layout by pressing Shift + A." This simple shortcut is your gateway to building components that effortlessly adapt.

Juno School Figma UI Design for Beginners Course Thumbnail
Recommended Course on JunoFigma UI Design for Beginners
View Course →

Step 1: Create Your Text Layer

The first step to creating your perfect button is surprisingly simple: just type out the text you want for your button. For example, let's use "Shop Now."

This text layer will be the core content of your future Auto Layout button.

Step 2: Add Auto Layout with 'Shift + A'

This is where the magic begins. Once your text layer is ready, you'll convert it into an Auto Layout frame.

You'll notice that your text layer is now contained within a frame. In the right sidebar, a new "Auto Layout" section will appear. This indicates that your text is now inside a responsive container. As a designer might say, "We pressed Shift + A and will design the UI a bit according to our needs." This action transforms a static text element into a dynamic component.

Alternatively, you can select the text layer and click the "plus" icon next to "Auto Layout" in the right sidebar.

Step 3: Add a Fill Color

Now that your text is in an Auto Layout frame, you can give your button a background color.

You'll see a background appear behind your text. At this point, the background might be tightly hugging the text without any spacing. That's what we'll fix next.

Step 4: Adjust Padding and Spacing

Padding is crucial for defining the visual space around your button text. This is where you control the button's overall size and ensure proper spacing. This step directly addresses how to manage auto layout padding Figma for a balanced look.

These padding values ensure that no matter how long or short your text becomes, the button maintains a consistent and aesthetically pleasing distance from its content. Understanding fundamental design principles, like the difference between raster and vector graphics, can further enhance your understanding of how these elements work.

Step 5: Add Corner Radius

To give your button a softer or more modern look, you can add a corner radius.

As a designer might explain, "Now we also need to add a corner radius to the button, so I've added, say, 32." This instantly rounds the corners of your button, completing its visual style.

The Magic Moment: Change the Text and Watch it Adapt

Now for the satisfying part! You've created your Figma Auto Layout button. To see its responsiveness in action:

(Imagine a GIF here: The button "Shop Now" is selected. The text is changed to "Add to Shopping Cart." The button's background automatically expands horizontally to perfectly fit the new text while maintaining the set padding and corner radius.)

Notice how the button's background automatically expands or shrinks to fit the new text, all while keeping your specified padding and corner radius intact. You no longer have to manually adjust anything! As we can now confidently say, "Our button is ready." This is the true power of learning how to make a button in Figma using Auto Layout.

Mastering Auto Layout is a fundamental skill for any UI designer, allowing you to build scalable and efficient designs. If you're looking to further your career development in design, understanding tools like Figma is essential.

Ready to level up your career?

Join 5 lakh+ learners on the Juno app. Certificate courses in Hindi and English.

Get it onGoogle Play
Download on theApp Store