Project overview
- Product: Figma Motion
- Topics: Arc tool, keyframes, easing
- Difficulty: Beginner
- Length: 15 minutes
In this project, you’ll use Figma Motion to create two loading indicators: one with a smooth, linear rotation and one with a path trim animation that grows and shrinks as it spins. Along the way, you’ll get hands-on practice adding keyframes to the timeline, using the path trim feature, and previewing your work.
Create the loading indicator design
We’ll start by designing the loading indicator.
- Use the Frame tool to add a 200 X 200 frame to the canvas
- Double-click the frame name and rename it to
linear. - Use the Ellipse tool to add a 80 X 80 ellipse and center it inside the frame.
- Select the ellipse and press Shift X to swap its fill and stroke, then update the Stroke fill to
#FFEEDA. - Set the Stroke position to Center and the Stroke weight to
14. - Rename the layer to
background. - Select the ellipse and duplicate it using the shortcut:
- Mac: Command D
- Windows: Control D
- Rename the new layer to
spinner. - Select the
spinnerlayer and set the stroke fill to#FFA73C. - Hover over the duplicated layer until you see the Arc handle appear. Click and drag the handle to set the arc sweep to
40%and the ratio to100%. You can also set these values in the Appearance section of the right sidebar. - Set the stroke’s end points to Round.
Create the linear loading indicator
Nice work! Of course, a loading indicator that doesn’t move is just a fancy circle. Next, we’ll switch to Figma Motion and start adding some movement.
Open Figma Motion
To open Figma Motion, switch the toolbar toggle to Motion. Once enabled, you’ll see the timeline along the bottom of your screen.
Change the timeline duration
By default, the timeline is set to 2000 milliseconds for new animations which is a bit longer than we need. Select the linear frame and change the timeline to 1400 milliseconds using the Duration field in the timeline controls.
Note: If your timeline is showing seconds instead of milliseconds, click the label next to the Duration field in the timeline controls to toggle the time unit.
Add the keyframes
Next, we’ll add keyframes to the timeline to build our motion.
What are keyframes?
Keyframes are the building blocks of motion design. A keyframe marks a point in time where you set a specific value for a layer property, such as opacity, position, or rotation.
To create motion, you need at least two keyframes: one for the start state and one for the end state. Figma Motion fills in the gaps between keyframes to create a smooth animation. Learn more about keyframes.
Rather than adding keyframes manually, we’ll use auto-keyframe to help us build our motion. When auto-keyframe is active, keyframes are automatically added to the timeline as you make changes to your design.
- Select the
spinnerlayer. - Click Toggle auto-keyframe in the timeline controls. You’ll know it’s active when a red line appears across the top of the timeline and on the playhead.
- Click and drag the playhead to the 1400 millisecond mark.
- In the right sidebar, enter
360in the Motion rotation field. Take a look at the timeline. Auto-keyframe automatically added two rotation keyframes to the timeline: one at the 0 millisecond mark with a value of 0 degrees, and another at the 1400 millisecond mark with a value of 360 degrees. - Click Toggle auto-keyframe again to disable it.
- Click Play or press Spacebar to preview your animation.
Adjust the easing
Nice work! Next, we’ll adjust the easing so that the motion is linear.
Why use linear motion?
Most animations use easing to mimic the natural acceleration and deceleration of objects in the real world. However, loading indicators are designed to repeat indefinitely, making this one of the rare cases where uniform, linear movement actually feels right. Learn more about easing.
To update the easing:
- Click the line that appears between the two keyframes to access the Easing menu.
- The easing is currently set to a custom Bézier curve. Open the Easing menu and select Linear.
- Click Play or press Spacebar to preview your animation again.
Create the path trim loading indicator
The linear version looks great! But if you want something with a little more personality, path trim lets you build a loading indicator that grows and shrinks as it spins.
Duplicate the linear loading indicator and update the arc sweep
- Select the
linearframe and duplicate it using the shortcut:- Mac: Command D
- Windows: Control D
- Rename the new frame to
trim path. - Switch the toggle to Design.
- Select the
spinnerlayer inside thetrim pathframe. - In the Appearance section of right sidebar, change the arc’s Sweep to
60%. - Switch the toggle back to Motion.
Update the rotation keyframes
Because we duplicated the linear frame, the rotation keyframes we applied earlier were also duplicated. Let’s update them now.
- Double-click on the keyframe at the 1400 millisecond mark to jump to it on the timeline.
- Change the Rotation value from
360to-185.
Add the path trim keyframes
Next, we’ll add new keyframes for the path trim properties.
How does path trim work?
Every vector path has a start and end point, each expressed as a percentage from 0-100%. Path trim lets you control how much of that path is visible at any given moment to create things like draw-on effects, erase effects, handwriting animations, and looping spinners.
Note: Path trim is only available for center-positioned strokes.
- Select the
spinnerlayer inside thetrim pathframe. - Move the playhead to the 0 millisecond mark.
- Click Toggle auto-keyframe in the timeline controls.
- In the Stroke section of the right sidebar, enter
20%in the Path trim end field. - Move the playhead to the 750 millisecond mark, then enter
100%in the Path trim end field.
Tip: You can move the playhead either by clicking and dragging it on the timeline, or by entering a time mark in the Current time field in the timeline controls.
Next, set the trim path start keyframes.
- Move the playhead to 650 millisecond mark, then enter
20%in the Path trim start field. - Move the playhead to the 1400 millisecond mark, then enter
80%in the Path trim start field. - Click Play or press Spacebar to preview your animation. Your loading indicator should stretch and shrink as it rotates.
What’s next?
Great job! You just animated two loading indicators using keyframes, easing, and the arc tool! If you’re looking for another challenge, try using different animations to create another loading indicator variation.
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.