How to Animate Buttons in Figma: A Comprehensive Guide to Interactive Prototyping

In this chapter, we'll be going over some examples of how to approach motion design for common prototyping tasks. Our first exploration will involve animating between button states in a component. Buttons are so common to prototypes and many design systems such as material design make heavy use of animated buttons. For this, we're going to go to our assets and components section, and we already have a simple button component already created here.

If we look inside, we have a label, which is text, and we have skin, which is simply a shape. I'm going to add a variant to this because as we talked about earlier in this course, there are two ways of going about creating motion inside of Figma. One is between frames and the other between variants of a component. With our simple button selected, I'm going to choose Add Variant from the top bar here. And there we are. We now have a default variant and one that's called Variant two.

In this project, we’re going to design a reusable button component that changes as you interact with it. Create the icon component set. Nice work! Next, we’ll create a filled variant of our save icon that will display when the button is pressed. Select the component you just created and click Create variant in the right sidebar. When you add your first variant, Figma will make an identical component with the same properties applied and add both to a component set, identified by a dashed purple border. Because our original component was named icon, the component set is automatically named icon.

If you take a look at the right sidebar, you’ll notice a new component property called Property 1 is available, with default and Variant2 as available values. Drag the instance into the button frame, to the left of the label. Apply boolean properties to the icon and label. The button is looking great!

However, you may not always need both an icon and a label when reusing this component across different designs. For example, you may want to use an icon-only button when screen space is limited or when the action is universally recognized, such as a Like button. Click the purple plus below the new variant to add a third variant. Select the original variant at the top of the component set. Select the middle button variant. Next to the state property, type hover in the value field to add a new value. Select the third variant. Next to the state property, type pressed in the value field.

Before moving on, check to make sure your component set looks similar to the following: Configure the saved variants. Our component set is coming together! Before moving on, check to make sure your component set looks similar to the following: Add prototype connections to your button. We’ll finish our button by adding prototype connections to make our component interactive. When recreating common UI elements (like buttons), look at how they behave in real products or design systems.

For more complex components, consider creating a flowchart to help breakdown the interaction into more digestible steps. Hover over the default, unsaved variant. Animations bring joy to digital interactions and can be used to communicate intended behavior. 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. Your final connections should look like this: Test your button. Awesome job!

What’s next? Congratulations! You just created an interactive button using a component set and prototyping. I like Figma, it’s one of those tools that from the first time I tried it I understood there’s something new and interesting here, since then it only got better with every update. As a designer/developer I always look out for new tools, both at the design front and at the development front, we clearly are in the golden age of new tools in both of these fronts. Figma has come a long way since I first tried it out. It matured as one of the most influencing design tools around, it also got an ecosystem of plugins around it and a few new tricks up its sleeve.

Somehow I see a lot of people eyeballing towards Adobe XD, Protopie, UXPin or Principle for their animation features, so I decided to write this article to let you know what’s possible these days in Figma. As our tools keep evolving I’m sure Figma will get more and more features and this article might seem quaint in a few months, but this is a snapshot of what’s possible today. In this article I will go over the different methods of adding animations to designs done in Figma, from the most simple to the complex, feel free to hop around them as you wish, this is my order: Method #1: Adding GIFs; Method #2: Figmotion; Method #3: Simple Prototyping in Figma; Method #4: Figma’s Smart Animate; Method #5: Code Your Animations.

Me and Noa Shpinat rocking Google’s TLV Campus. This article is a result of a workshop we did in Google For Startups TLV Campus last month, it was really inspiring to see the reaction on people's faces when we got to the animation part. All examples shown here were made in collaboration with Noa Shpinat from Peanuts Studio and Ido Zaifman, Figma’s local community leader, many thanks to both.

Method #1: Adding GIFs. GIFs are the simplest way to add animation in Figma, you can just drag and drop GIFs like any other image file and it should play automatically when you enter Present mode. Dragging an animated GIF into Figma, GIF content made by Eadweard Muybridge. Figma can display any part of the GIF on the frame itself. Make your own! For more details see Method #2.

Method #2: Figmotion. GIFs can be made with a variety of tools. Most notably is Adobe Photoshop, but this is Figma, so let’s make a GIF with Figmotion, which is a plugin for Figma that lets you make keyframe-based animations (kind of like a mini version of After Effects). Figmotion is a bit tricky because it’s an external plugin, it has some bugs and unintended consequences sometimes. It’s a great way to add motion to your designs and render those designs as a video or a GIF to share with other people on the team.

How do I install a Plugin in Figma? First of all, if you don’t have the plugin installed, go to your Figma app and under the Plugins menu go to Manage Plugins, here you’ll see a few featured plugins. If Figmotion isn’t there go to Browse all plugins and there will be a list of all the plugins available, you can go to the search box at the top right corner and just type Figmotion. Now that we have the plugin installed, let’s dive right in, to open Figmotion go to Plugins and select Figmotion, Open Figmotion, the plugin will be opened in a new window above everything else.

If you want to animate an element you must insert that element inside a frame, so you’ll have a canvas for the plugin to work on. Figma’s Frame (the white canvas) and an element (the blue square), This is the minimal setup for Figmotion. The plugin might prompt you to select a frame that you want to work on. It refers to Figma’s frames, like artboards or canvases in other apps, not animation frames, which is something else. Tip! If you select your Figma frame and then open Figmotion, it will automatically select the selected frame as the frame you’ll be working on.

Now you should be able to see your elements in Figmotion layers and you can animate them as you wish. You can also go directly to a specific element by selecting it from the list at the top right corner of the plugin window. Now let’s say you want to animate the rotation of your element, first find in the list of animatable properties the rotation line and then click on the keyframe button (looks like a rhombus, just like in After Effects). Adding a keyframe in Figmotion. We can scrub the timeline or just use the 0ms, 100ms, 200ms links (yes, those labels are clickable links) and then create another keyframe by clicking on the same keyframe button as in the above screen capture. After creating the keyframe we can just click on it and manually change the value at this time, or change the element rotation in Figma and then click on the keyframe to edit it and click the brush icon to grab Figma’s current state, this workflow seen in the screen capture below. Figmotion Brush button captures the state of the element from Figma’s frame. After you’re done with your animation, Figmotion can either render it out as a video or a GIF by clicking the Render button and then selecting the appropriate format. Figmotion’s Render as a looped GIF. The plugin can also export your animation as code by clicking the Export button, you’ll have to choose between CSS and JSON files, a good rule of thumb is to export CSS for the web and JSON for mobile apps, even though sometimes you’ll be asked to break this rule, just ask your developers or export both. The code it exports is relatively clean and easy to read, even though sometimes it saves more information than it needs and some parameters, like circle arc, just can’t be achieved in CSS.

Informative themes for animated buttons in UI

Method #3: Simple Prototyping in Figma. Prototyping is the simple act of connecting different screens (or frames in Figma) in order to construct an interactive simulation of your app or product. In this method we’ll dive in to the prototype options Figma has to offer, all but the Smart Animate feature, which we’ll cover in the next method (which is Method #4). If you’ll switch to prototype mode from the Prototype tab, you’ll notice that every object you select, including Figma’s frames, have a little white dot on its right side. These dots let you connect the frames or objects to each other, if you’ll click the dots you’ll be able to drag an arrow from one frame to the next, that way you’ll have a flow ready to go.

The arrows representing the flow between frames (or objects). After connecting the screens you’ll see on the Prototype tab options for your selected interaction. If you can’t see the options titled Interaction and Animation, you need to click on one of these blue arrows. Once you selected an arrow, the option titled Interaction is where you can pick the kind of trigger and behavior for this interaction. The Animation part is where you’ll pick the animation style and duration.

I won’t cover all the triggers but a few important ones are: On Click, While Hovering, Mouse Enter/Mouse Leave, and After Delay. Best to use When mouse enter for menus and sub menus. The most common one is Navigate To, which gives you the option to select a different frame that the user will arrive to when this interaction is over. You can also use Open Overlay to swap objects on the frame without completely change the entire frame, this interaction can also add a semi-transparent background and the option to close the overlay when clicking outside of the object, think of popups or alerts.

Figma Prototyping Animations in action, all set to Ease In And Out and 300ms Duration. Remember, animations can be set with 3 parameters: animation type, timing and duration. Animation type includes Instant, Dissolve, Move In/Out, Push and Slide In/Out. Timing includes Ease In, Ease Out, and Ease In And Out. Duration is in milliseconds, typical UI animations are 200-300ms. When you’re done with prototyping, you can click the Present button to see it in action.

In the Prototype tab, you can also set Smart Animate. Smart Animate connects two similar frames and interpolates the in-between frames for a fluid transition. The technique treats frames as key-frames for animation. The requirement is that layers are identical in both frames and named consistently. You can mix methods and even combine with GIFs or overlays. Tip: keep layers organized and avoid changing layer order or frame size during the animation.

A good example of Smart Animate is a character looking around at the mouse cursor, done with frames A and B and invisible rectangles that change frames on hover. You can mix Open Overlay (for hover overlays) with Smart Animate for richer interactions. Press enter or click to view image in full size. Figma’s frames can be used to craft the animation, as in the example above, with the button overlay at the end.

Method #5: Code Your Animations. The last method here involves coding in CSS. If you’re unfamiliar with CSS, exporting frames as SVG files and refining in code is a practical approach. This helps you achieve custom easing and timing beyond the built-in presets. Having said that, CSS knowledge becomes a valuable skill for designers who want precise control over pixel-level details and cross-platform consistency.

  • Animated buttons draw user attention, improve engagement, and clarify actions.
  • Use a mix of frames, variants, and prototypes to build reusable interactive components.
  • Keep layers organized and maintain consistent naming for reliable Smart Animate results.

Interactive Components enable you to create prototype interactions between variants in a component set and they're ready to go anytime you add an instance. Create multiple instances and experiment with different behaviors all within your design. Variants allow you to create, test and iterate on design ideas with ease. No more sending your team links back and forth to try out different combinations of color and spacing. You can add variants to any component in your design, name them, and then choose the best one for your project. Variant properties and their values allow you to define the attributes of your variants. Variant properties are a type of component property specific to variants and component sets. Once you have all the components set properly, you can test it in your project. Go to your asset and select Local components, then drop and drag your component. If you are able to change the value of your variant from the inspector, that’s mean everything works fine!

Now we are ready to turn our components into animated parts. In this example, we will create two interactions: On hover and On click. When the user hovers over a button, it will change color. Animated buttons can be a great way to make interfaces more interactive and engaging. By following the steps outlined in this tutorial, you can quickly create an animated button prototype. After the environment has been set up and the button has been designed, animations can be created and tested in the actual project environment. With a bit of practice, animated buttons can quickly become an indispensable tool in your prototyping repertoire.

tags: #how #to #animate #buttons #in #figma