Tutorials2 min read

How to Animate a Slider in Figma

Every designer knows that animation keeps users from getting lost in a flood of information and makes an interface feel more alive. So how about we add some interactivity to our mockup today and create a slider animation right in Figma?

At first glance, it can look complicated: layers, logic, prototyping, timing settings… But it’s actually easier than it seems! Especially now that you’ve opened this tutorial. The key is to understand how it works and know which tools and settings you need. After all, you’ll agree that boring static cards on a site are one thing, and cards that glide, change, and respond to what the user does are something else entirely. Small details like these are exactly what make an interface feel more human.

And today we’ll show you how to create this kind of slider animation in Figma so you can confidently use it in your own projects. Got Figma open? Then let’s get started!

Step 1: Create a Frame

If you’ve already practiced with our other Figma tutorials, you may have noticed that the first step never began with creating a frame. So why is it the other way around here? Here’s the answer: the slider, which will be part of a design concept, will take up the smaller part of the screen, so it’s important to work out all the interface details up front: the header, lines, icons, buttons, and so on.

  • Create a 1728*1117 frame.
  • Set the fill to #F4F4F4.

Step 2: Add Lines and a Header

I want to use lines to divide up the screen space a little. And visually, the slider cards will disappear behind one of those lines. But so we don’t get confused, we’ll come back to that logic a bit later. For now, let’s add the lines and the header.

  • Add lines in #3E3E3E with some transparency.
  • Create a header and add it to the frame.

Step 3: Create an Additional Frame

No, not a 1728*1117 one, but one the size of the future slider area. In my design, the slider will sit at the right edge of the frame, below the header.

  • In the right part of the frame, create another frame with no fill.
  • Set its size to 680*990.
  • Make sure Clip content is turned on for it.

Step 4: Create a Card

Product cards will be moving through our slider. I’ll have three in total.

  • Build a product card from a 315*613 rectangle (the area for the future photo), text, and lines.
  • Make copies so there are 3 in total. And set the auto layout spacing between them to 125.

Then change the text in each card to suit your site. Mine will be a perfume store.

Step 5: Find and Set Up the Photos

I generated all the photos in Midjourney, but you can also find quality images on free stock photo sites.

  • Generate or find your photos.
  • Add them to Figma.

Now we need to set them up, namely remove the background and add them to our cards. We covered how to do this quickly in this tutorial.

Step 6: Add the Cards to the Frame

We’re adding the cards not just to any frame, but to the additional one we created specifically for the slider.

  • Add the cards to the additional frame.
  • Align them to the frame.

After that, be sure to make copies of the first two cards and move them to the very end of the auto layout.

Step 7: Add the Other Content

We’ve already added the header, lines, and slider, but we still need text and a marquee that scrolls on hover. We’ve already built one in this tutorial and know how to set it up.

Step 8: Create a Button

Right now the design is missing an important element: a button. The idea is for it to be round and change color from white to orange on hover.

  • Create two 120*120 circles.
  • Add the text NEXT to each.
  • For the first, set the fill to #F5F5F5 with a #FBFBFBF stroke. The text inside is #CD4B18.
  • For the second, the fill and stroke are #CD4B18, and the text is #F5F5F5.

Now select both circles and choose Create component set in the menu on the left. This gives us a component with two variants.

  • Create a component set.
  • Give each variant its own name in the panel on the right.

Set up a hover animation between them using While hovering.

  • Add the While hovering trigger.
  • Set the animation to Smart animate at 300ms.

Move the button into the frame. And now we have everything we need to start animating the slider.

Step 9: Create a Component from the Frame

To set up the slider, we need to turn our frame into a component with a first variant.

  • Create a component from the frame.
  • Create a variant.

Step 10: Set Up the Second Variant

In this variant, we need to shift the auto layout with the slider cards so the second card takes first place and the first one hides behind the frame. That’s why we checked earlier that Clip content was turned on for it.

  • Move the cards’ auto layout to the left, past the frame.
  • Check that nothing has moved in the layers on the left.

Step 11: Create the Other Variants

Do exactly the same in each new variant, until the last variant ends up being a copy of the first. That’s why we made copies of the first cards: to build not just a slider, but an infinite slider in Figma.

Step 12: Set Up the Animation

Our main animation trigger will be On click on the Next button. And between the last and first variants, we need to add After delay.

  • Between the variants (except the link from the last to the first), add an On click trigger on the right arrow.
  • Set the animation to Smart animate at 400ms.

Now all that’s left is to add an After delay animation of 1ms between the last and first variants. And don’t forget to set the animation to Instant.

Step 13: Create a New Frame

Now we need to see the results of our work. To do that, we create a new frame to test our decisions, in case something went wrong and needs fixing right away.

  • Create a new 1728*1117 frame.
  • Add a copy of the first variant to it.
  • And turn on Present.

Your Figma Slider Animation Is Ready!

Now you’ve got one more animation in your design toolkit. You can add a slider animation to landing pages, put it in a catalog for easy product browsing, or use it in a presentation to draw attention to the key point of a case study. And if you want even more cool ideas and useful Figma lessons, head over to our Figma Tutorials section.

 

Article updated

Subscribe to our regular digest

We'll send you useful articles and news from the world of AI, design, tech, and career growthdesign, and tech

Over 3,000 people already get our useful content