Upslide Mascot showing somthing

June 04, 2026

June 04, 2026

June 04, 2026

Read Time Icon

6 mins read

6 mins read

6 mins read

How to Create a Button Component in Figma with Auto Layout

How to Create a Button Component in Figma with Auto Layout

How to Create a Button Component in Figma with Auto Layout

What happens to your button when its label becomes longer or an icon is removed? A reusable component should handle those changes without a designer manually repairing every instance. This guide builds one small button system. Its example dimensions are starting values for a component exercise, followed by stress tests that reveal whether the structure actually works.

What happens to your button when its label becomes longer or an icon is removed? A reusable component should handle those changes without a designer manually repairing every instance. This guide builds one small button system. Its example dimensions are starting values for a component exercise, followed by stress tests that reveal whether the structure actually works.

What happens to your button when its label becomes longer or an icon is removed? A reusable component should handle those changes without a designer manually repairing every instance. This guide builds one small button system. Its example dimensions are starting values for a component exercise, followed by stress tests that reveal whether the structure actually works.

One component, several meaningful states. Original illustrative diagram; the accompanying text explains the example.


Define the component before adding variants

Property

Example definition

What to verify

Base structure

Horizontal Auto Layout: optional leading icon, label, optional trailing icon

The label and icon remain aligned as content changes.

Sizing

Hug content by default; 16 px horizontal padding; 12 px vertical padding; 8 px icon gap

The instance grows with the label.

Size variants

Small / Medium / Large, each with documented padding and type size

A size change updates the system rather than isolated layers.

Type variants

Primary / Secondary / Destructive

Meaning and hierarchy remain distinguishable.

State variants

Default / Hover / Pressed / Focus / Loading / Disabled

Every meaningful state has a deliberate appearance.

Optional content

Boolean icon visibility and an instance-swap icon where useful

Removing an icon also removes unnecessary space.


Build and test one instance

  • Create the Auto Layout base around the actual content rather than placing a fixed rectangle behind a loose text layer.

  • Convert it into a component and add the selected properties.

  • Use a long label such as “Send request for manager approval”.

  • Swap the icon, hide it, and check both leading and trailing positions.

  • Put the instance in a narrow Auto Layout container and verify the chosen hug/fill behavior.

  • Keep width stable during loading so adjacent controls do not jump.


Debug resizing and interactions

If a long label clips, inspect fixed dimensions and the text’s resizing rule before reducing its font size. If an instance stretches unexpectedly, inspect the parent container as well as the component. If a prototype stops responding, check that the intended trigger still connects the relevant variants after changes.


Figma’s official tutorial explains the basic text-to-Auto-Layout construction used by this recipe:  create the button


A production component is defined by its variation and failure behavior, not only its default screen.


Why UI Buttons Matter

Buttons are action triggers.

They help users:

  • Submit forms

  • Complete purchases

  • Save information

  • Navigate screens

  • Confirm actions

  • Start important workflows

A well-designed button should instantly communicate:

  • What happens when clicked

  • Whether it's clickable

  • How important the action is

Good button design reduces friction and improves conversion rates.

Step 1: Start With the Text

Many designers start by drawing a rectangle.

This is the wrong approach.

Professional UI buttons start with the label.

Ask Yourself:

What action will happen when users click this button?

Examples:

Create Accoun, Start Free Trial, Save Changes, Download Report, Continue

Avoid vague labels such as:

Click Here, Submit, Proceed

Specific labels improve usability and increase user confidence.

Step 2: Add Auto Layout

Once your text is ready, apply Auto Layout.

Shortcut:

Shift + A

Auto Layout automatically:

  • Creates proper spacing

  • Maintains alignment

  • Adapts to text length

  • Makes buttons responsive

Without Auto Layout, every size change requires manual adjustment.

With Auto Layout, buttons become scalable and easier to maintain.

Why Auto Layout Is Essential

Imagine changing:

"Login"

to

"Start Your Free Trial"

Without Auto Layout:

  • Button breaks

  • Text alignment shifts

  • Manual resizing becomes necessary

With Auto Layout:

Everything adjusts automatically.

This is why modern design systems rely heavily on Auto Layout.

Step 3: Add Proper Padding

Padding determines the size and feel of your button.

Good padding makes buttons:

  • Easier to tap

  • Easier to read

  • More visually balanced

Recommended Starting Values

Horizontal Padding:

24px

Vertical Padding:

14px

These values work well for many desktop and mobile interfaces.

Why Padding Matters

Too little padding creates:

  • Cramped buttons

  • Small touch targets

  • Poor readability

Too much padding creates:

  • Oversized components

  • Layout imbalance

  • Wasted space

The goal is visual comfort and usability.


For additional state and handoff checks, review UI/UX micro tips.

Step 4: Add Color

Color helps establish hierarchy.

Users naturally notice colored buttons first.

Primary Buttons

Use strong, high-contrast colors.

Examples:

  • Orange

  • Blue

  • Green

Secondary Buttons

Use:

  • Outlines

  • Neutral colors

  • Lower visual weight

Tertiary Buttons

Often use:

  • Text-only styles

  • Minimal emphasis

The most important action on the screen should have the strongest visual presence.

Add color in brief

Choosing Button Colors

Button colors should align with:

  • Brand identity

  • Accessibility requirements

  • Visual hierarchy

Common examples:

Orange

Creates energy and urgency.

Used by brands like Swiggy and HubSpot.

Blue

Creates trust and reliability.

Common in SaaS products.

Green

Often used for success actions and confirmations.

Step 5: Add Corner Radius

Corner radius affects personality.

Sharp corners feel:

  • Technical

  • Structured

  • Formal

Rounded corners feel:

  • Friendly

  • Modern

  • Approachable

Recommended Radius

A common starting value:

12px

This creates a balanced and modern appearance.

Add corner radius in brief

Understanding Button Shapes

Different products use different styles.

Small Radius (4px–8px)

Best for:

  • Enterprise software

  • Financial platforms

  • Data-heavy products

Medium Radius (10px–16px)

Best for:

  • SaaS products

  • Mobile apps

  • Dashboards

Pill Shape (999px)

Best for:

  • Modern consumer apps

  • Call-to-action buttons

  • Marketing websites

Step 6: Add a Subtle Stroke

This is a small detail that dramatically improves button quality.

Recommended Stroke

Width:

1px

Color:

A slightly lighter or darker version of the button color.

Subtle stroke added

Why Strokes Matter

A subtle stroke helps:

  • Define button boundaries

  • Improve visual depth

  • Create a more polished appearance

Especially useful when:

  • Buttons sit on colorful backgrounds

  • Interfaces use gradients

  • Multiple buttons appear together


For the visual construction of a dimensional treatment, follow the gradient button tutorial.

Common Button Design Mistakes

Even experienced designers make these mistakes.

Using Rectangles Instead of Auto Layout

Creates maintenance issues.

Always use Auto Layout.

Final Thoughts

Creating professional UI buttons in Figma is not about adding colors and rounded corners.

It's about creating components that are:

  • Clear

  • Accessible

  • Consistent

  • Scalable

  • Easy to maintain

The simplest button often performs the best.

Start with the text.

Use Auto Layout.

Apply proper padding.

Create visual hierarchy.

Add subtle polish.

And always design for usability first.

Frequently asked questions

Why use Auto Layout for buttons?

Auto Layout lets a button respond to its label and content while retaining consistent padding and spacing. It makes it easier to test long text, optional icons and different sizes without manually repositioning the component’s layers.


How should button components handle long labels and icons?

Define padding, the gap between icon and label, and a policy for long text. Check both leading and trailing icons, translated labels, narrow containers and loading states. Do not shrink the label until it becomes unreadable merely to preserve the initial width.

Struggling with your product bad UX ?

Struggling with your product bad UX ?

We help software become easier to use, adopt & scale through intuitive design and better user experiences.

We help software become easier to use, adopt & scale through intuitive design and better user experiences.

Multiple Ui screens of SaaS

Get in touch

Get in touch

Get in touch

Get in touch