Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Courses, tutorials, projects – Figma Learn
  • Projects
  • Projects

Design an interactive button

Written by Figma Man

Updated at June 19th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Administration – Figma Learn
    Manage files and projects Manage a team Manage your account Manage a Figma organization Manage Enterprise plan settings and permissions Billing Manage Figma in a school
  • Figma Design – Figma Learn
    Create prototypes Import and export Create designs Tour the interface Dev Mode Work together in files Build design systems Figma Draw
  • Get started – Figma Learn
    Set up your account Layers 101
  • FigJam – Figma Learn
    Import and export Run meetings Work on boards Tour the interface
  • Community – Figma Learn
    Explore the Community Creator tools and resources
  • Help – Figma Learn
    Troubleshoot Common questions Work with support
  • Work across Figma – Figma Learn
    Figma AI Work across Figma
  • Courses, tutorials, projects – Figma Learn
    Courses Projects
  • Figma Slides – Figma Learn
    Create and edit slides Present slide decks Tour the interface Import and export
  • Figma Buzz – Figma Learn
    Templates in Figma Buzz Create and edit assets in Figma Buzz Overview
  • Figma Make – Figma Learn
    Tour the interface Work with Figma Make
  • Figma Sites – Figma Learn
    Design a site Create webpages and breakpoints Make your site interactive Preview and publish a site Tour the interface
+ More

Table of Contents

Create the main button component Why use a slash separated naming system? Create the button variants Why do we need two variant properties? Configure unsaved variants Configure saved variants Add prototyping connections to your button What connections do we need? Add the hover trigger Why set the animation duration to 150ms? Add the mouse down trigger Add the mouse leave trigger Add the mouse up trigger Play your button What’s next?
Project overview
  • Product: Figma Design
  • Topics: Auto layout, components, variants, prototyping
  • Difficulty: Intermediate
  • Length: 20 minutes

In this project, we’re going to design an interactive button. This button will feature three states—default, hover, and pressed—and be animated using prototyping.

To build this button, we’ll do the following:

  1. Create the main button component.
  2. Create the button variants.
  3. Add prototyping interactions to connect the button variants.

When you’re done, your button will look and behave similar to the following:

final button design

Create the main button component

To start, we need to make our main component that will be used to create the button variants.

  1. Select the Text tool in the toolbar, click on the canvas, and type Save.
  2. Select the text layer and use the Text section in the right sidebar to change the font size to 16. We’re using the default Inter font for this tutorial but feel free to pick something else.
  3. Select the text layer and use the keyboard shortcut Shift A to turn it into an auto layout frame.
  4. In the right sidebar, ensure that the Vertical resizing and Horizontal resizing settings are both set to Hug.
  5. Style the frame by adjusting the following:
    • Click the plus in the Stroke section and add an inside stroke with a weight of 2
    • Click the plus in the Fill section to add a fill
    • Change the corner radius to 8
    • Change the horizontal gap between objects to 8
    • Change the horizontal padding to 32
    • Change the vertical padding to 12

Before moving on, check to make sure your button looks similar to the following:

Style your button.png

Tip: You can also set padding on an auto layout frame using this shortcut. Hold ⌘ Command or ⌃ Control and click into a padding field in the right sidebar. Type your vertical padding number first and then horizontal padding number, separating both numbers with a comma 12,32.

If you want to enter different numbers on all sides, then enter the numbers in the order of top, right, bottom, then left. For example, entering 1,2,3,4 sets the top, right, bottom, and left padding to 1, 2, 3, and 4 respectively.

Next, we’ll add a bookmark icon. You can create your own icons or use one of the many icon plugins found on the Figma Community. For this tutorial, we’ll be using the Phosphor Icons plugin to insert two bookmark icons.

  1. Click Actions in the toolbar.
  2. Click the Plugins & widgets tab.
  3. Enter “Phosphor” in the search field.
  4. Select Phosphor Icons to open the plugin.
  5. In the Phosphor Icons plugin, enter “Bookmark” in the search field.
  6. We’re going to use the Regular and Fill versions of the “BookmarkSimple” icon. Use the plugin’s filter option to find both versions.
  7. Click and drag the icons onto the canvas.

image (1).gif

Let’s make sure the icons are the correct size for our button:

  1. Select the two icon frames.
  2. Make sure Constrain proportions is enabled in the right sidebar and change the frame width to 24.
  3. You can move the filled icon to the side for now. Drag the regular icon into the button frame to the left of the button label. Since this is an auto layout frame, the frame automatically adjusts to fit the icon.

Select the button frame and click Create component in the right sidebar. This will be the main component we’ll use to create the other button variants. Double-click on the frame name and rename it to button/default/unsaved.

Before moving on, check to make sure your button look similar to the following:

Check your work.png

Why use a slash separated naming system?

Structuring your component name with slashes ( / ) allows you to quickly set the component’s property values. Any text before the first slash will become the component name and every extra slash level creates a new property that will be applied to all variants in the component set. For example, our button has the name button/default/unsaved.

Once you add a variant, the component set will look like:

  • Component set name: button
  • Property 1: default
  • Property 2: unsaved

To finish the configuration, we'll need to update the property names and add property values for each variant in the component set. We’ll walk through this process in the following section.

Naming components

Create the button variants

Now that we have our main component, we can use it to add additional button variants to our component set. Each variant will have two variant properties.

Why do we need two variant properties?

Because our button has a saved and unsaved status, and both status variations can move through different interactive states (default, hovered, or pressed), we need a status variant property and state variant property to cover each of these cases.

The number of variant properties you need is determined by the number of variant types in your component set. For example, if we expanded our component set to include a large and small version of each button and a text-free version, we would need to add two additional variant properties: size (large or small) and hasText (true of false).

Variant properties

Configure unsaved variants

First, we’ll configure our unsaved variants.

To add variants:

  1. Select the component you just created.
  2. Click Add variant in the right sidebar.
  3. Click the purple plus below the new variant to add another variant.

Now we need to configure each of these button variants so that they contain default, hovered, and pressed states.

Select the original variant at the top of the component set. In the Current variant section of the right sidebar, you’ll see that this variant has a property of Property 1 with a value of default and a Property 2 with a value of unsaved. Let’s update the property value names to be more descriptive.

  1. Double-click on Property 1 and rename it to state. Do the same for Property 2 and rename it to status. Now, all of the variants in the component set have two properties called state and status.
  2. Select the middle variant. Next to the state property, type hover in the property value field to add a new value. Use the Fill section to change the variant’s fill to #E3E4EB.
  3. Repeat the process with the bottom variant. Next to the state property, type pressed in the property value field and change the fill color to #A8A9B2.

Before moving on, check to make sure your component set looks like this:

Check your component set properties.png

Configure saved variants

Our component set is looking great. Now we need to add the saved variants and create their different states.

  1. Click the purple plus to another variant.
  2. With the new variant selected, double-click on the text layer and type Saved.
  3. Select the filled BookmarkSimple icon you added to the canvas earlier and copy it.
  4. Select the unfilled icon version in the variant you just created, right-click and select Paste to replace.

image (2).gif

  1. Select the top variant. Leave the state property as-is and add a new status property value called saved.
  2. With the new saved variant still selected, click the purple plus to add two more variants.
  3. Select the middle variant and change the state property value to hover and the fill to #E3E4EB.
  4. Select the bottom variant and change the state property value to pressed and the fill color to #A8A9B2.

When you’re done, your component set should look similar to the following:

Final component set (1).png

Add prototyping connections to your button

Next, we’ll add prototyping connections to make our button interactive. If you’re new to prototyping, check out the glossary in our comprehensive guide to prototyping to learn more about the terms used in this section.

What connections do we need?

Before adding prototype connections, it’s important to plan out what you want the different interactions to look like.

When recreating common UI elements (like buttons), referencing other buttons or reading existing documentation can help you understand how the element should behave. Take notes on the interaction and try to match them with corresponding prototype triggers in Figma, such as while hovering, on click, mouse enter, etc.

For more complex components, consider creating a flowchart to help breakdown the interaction into more digestible steps.

For this button, our interactions will look like this:

  • When a cursor is hovering over the button, we want the hover state to appear
  • When a cursor presses down on the button, we want the pressed state to appear
  • If the cursor leaves the button surface while pressing down, we want the button to remain in the default state
  • When the unsaved button is pressed, we want the state to change to saved
  • When the saved button is pressed, we want the state to change to unsaved
Prototyping

Add the hover trigger

  1. Click the Prototyping tab in the right sidebar.
  2. Select the default, unsaved variant and click and drag the blue plus to the hover, unsaved variant.
  3. Apply the following interaction settings:
    1. Change the trigger to While hovering
    2. Set the action to Change to
    3. Set the animation to Smart animate
    4. Change the transition to Ease in and out
    5. Enter 150ms in the Duration field.
  4. Apply an identical prototype connection between the default, saved and hover, saved variants.

Your first two connections should like this:

First prototype connection (2) (1).png

Why set the animation duration to 150ms?

Animations bring joy to digital interactions. When animating your designs, make sure that it enhances the user experience without delaying people from reaching their goal. For web-specific content, it’s common practice to have animations to land in the 150-300 ms range. Animations in this range will allow users to notice the interaction but will not prevent them from moving forward in a timely manner.

Prototype animations

Add the mouse down trigger

  1. Select the hover, unsaved variant and click and drag the blue plus to the pressed, unsaved variant.
  2. Leave the rest of the connection settings as they are but change the trigger to Mouse down.
  3. Apply an identical prototype connection between the hover, saved and pressed, saved variants.

Your connections should like this:

Second prototype connection (2) (1).png

Add the mouse leave trigger

  1. Select the pressed, unsaved variant and click and drag the blue plus to the default, unsaved variant.
  2. Leave the rest of the connection settings as they are but change the trigger to Mouse leave.
  3. Apply an identical prototype connection between the pressed, saved and default, saved variants.

Your connections should like this:

Third prototype connection (2) (1).png

Add the mouse up trigger

We need to add two final connections so that the unsaved button can become the saved button when pressed, and vice versa.

  1. Select the unsaved, pressed variant click and drag the blue plus to the default, saved variant.
  2. Leave the rest of the connection settings as they are but change the trigger to Mouse up.
  3. Apply an identical prototype connection between the pressed, saved and default, unsaved variants.

You final connections should look like this:

Final prototype connection (2) (1).png

Play your button

It’s time to see your button in action!

  1. Select the Frame tool in the toolbar or press F and add a frame to the canvas.
  2. From the Assets tab, drag an instance of your button into the frame.
  3. With the new frame selected, click the Prototype view dropdown in the toolbar and select Preview.
  4. Use your cursor to hover over and interact with the button.

Test out your interactive button by adding an instance and playing the prototype.gif

What’s next?

Great job! You designed an interactive button using a component set and prototyping. If you’re looking for another challenge, try creating a component set that includes an icon-only button. If you design something you're extra proud of, we'd love to see it! Mention us on X (formerly Twitter) @Figma or publish it to the Figma Community.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Design your first button
  • Create your first meeting board in FigJam
  • Create a photo gallery prototype
  • Create an illustration using shapes, transforms, and effects
  • Create a reusable icon grid
  • Blog
  • Best practices
  • QR code generator
  • Color wheel
  • Colors
  • Color picker
  • Color palettes
  • Color palette generator
  • Color contrast checker
  • Font Library
  • Templates
  • Developers
  • Integrations
  • Affiliate program
  • Resource library
  • Reports and insights
  • Support
  • Status
  • Legal and privacy
  • Modern slavery statement
  • Climate disclosure statement
  • COMPARE
  • Sketch
  • Adobe XD
  • Framer
  • Miro
  • COMPANY
  • Events
  • Customers
  • Careers
  • Newsroom
Expand