Motion and Interaction · Labs · 4 min read
Prototype a microinteraction in Figma
A guided lab: map a Save button's microinteraction on paper, build it as one interactive component with five variants, wire the triggers with Smart animate and your motion tokens, make a reduced-motion version and hand it off. About an hour and a half, with a free Figma account.
A microinteraction you can only describe is one a developer has to guess. A prototype lets people press it, and the map behind the prototype tells everyone what they pressed. You'll build a Save button that answers a hover, gives under a press, shows it's saving and confirms it saved, all inside one component, using the same durations and curves your code uses.
What you'll do:
- Map the microinteraction: variants, triggers, animations, durations
- Build it as one interactive component in Figma
- Use your motion tokens as Custom bezier curves
- Make a reduced-motion version and write the handoff note
You'll need: a free Figma account, the token set from Write a set of motion tokens (or the one in Motion tokens), paper, about an hour and a half.
1. Map it first
- 1Default
The variant everyone sees first.
Start - 2Hover
Fill a little darker.
While hovering · Smart animate · standard · 150 ms - 3Pressed
Scale 96%.
While pressing · Smart animate · standard · 100 ms - 4Saving
Label swaps for a spinner.
On click · Change to · Smart animate · standard · 150 ms - 5Saved
Tick and "Saved". Back to Default after 1500 ms.
After delay 1200 ms · Smart animate · enter · 250 ms
The Saved step as CSS: the tick grows in 250 ms, with the enter curve. Click to toggle.
Your system asks for reduced motion, so the tick fades in instead of growing.
Draw the map before you open Figma. Each box is a variant; each arrow is a trigger, an animation, a curve and a duration. The parts come from Anatomy of a microinteraction: the trigger (a click), the rules (save, then confirm), the feedback (hover, press, spinner, tick) and the loop (back to Default).
The live button in the figure is the Saved step in CSS, so you can feel the 250 ms before you build it.
2. Build the variants
- Draw the button once: a frame with auto layout, a label and an icon slot.
- Make it a component, then add variants with one property, State: Default, Hover, Pressed, Saving, Saved.
- Change only what the map says: a darker fill for Hover, 96% scale for Pressed, a spinner instead of the label for Saving, a tick and "Saved" for Saved.
- Keep the layer names identical across variants. Smart animate matches layers by name and position in the hierarchy; a renamed layer just dissolves instead of moving (Figma Help, Smart animate).
- To hide something, set its opacity to 0% rather than hiding the layer, which Figma recommends for Smart animate.
3. Wire the triggers
Open the Prototype tab and connect the variants inside the component set (Figma Help, interactive components):
| From | Trigger | Action | To | Animation |
|---|---|---|---|---|
| Default | While hovering | Change to | Hover | Smart animate, standard, 150 ms |
| Hover | While pressing | Change to | Pressed | Smart animate, standard, 100 ms |
| Default and Hover | On click | Change to | Saving | Smart animate, standard, 150 ms |
| Saving | After delay, 1200 ms | Change to | Saved | Smart animate, enter, 250 ms |
| Saved | After delay, 1500 ms | Change to | Default | Smart animate, standard, 150 ms |
"While hovering" and "While pressing" return on their own when the pointer leaves or the press ends; "After delay" fires after the set time on that state (Figma Help, Prototype triggers). On click goes on Default too, because a touch screen has no hover.
4. Use your tokens, not presets
In each animation, open the curve menu and pick Custom bezier, then type the token's four numbers: 0.2, 0, 0, 1 for standard, 0, 0, 0, 1 for enter. The values map straight to CSS cubic-bezier() (Figma Help, easing and spring animations). Figma can't save a custom curve, so copy and paste it between interactions.
That's the whole point of this step: the prototype now moves exactly like the code will. "Ease out" in Figma and ease-out in CSS are not guaranteed to be the same curve; four numbers are.
5. Make the reduced-motion version
Duplicate the component set and name it "Save button, reduced motion". Remove the 96% scale from Pressed, and change the animations that move things to Dissolve, 150 ms. Colour and opacity changes can stay as they are.
Put both on one page, side by side, labelled. Reviewers should see the reduced version as part of the design, not as an afterthought (see Designing a reduced-motion version).
6. Test it
- Presentation view, then the Figma app on a phone. Does the press feel immediate? Does 1200 ms of saving feel long?
- Click twice fast. What should happen on a second click while it's saving? Add that to the map.
- Show it to one person without explaining. Can they tell the save worked?
7. Hand it off
Paste the map from step 3 into the component's description, with the token names. Add a link to the code tokens. The developer should be able to build it from the description alone, and the prototype is there to show the feel (see Lottie, Rive and handing off motion).
8. Check your work
Reflection questions: Which state was hardest to make feel right, and why? What did the second-click test add to your map?
Related
Prototyping motion in Figma · Anatomy of a microinteraction · Feedback while waiting · Motion tokens · Lottie, Rive and handing off motion · Microinteraction model