Stupid question, but I can’t work out how they are different in practice. Must be something obvious that I’ve missed…
Thanks But what I meant was, what is the practical difference between setting the two actions in Figma?
So for example, if I set a button to do something on tap as opposed to while pressing, the effect seems to be the same.
This is wrong.
-
Tap: touch and release.
Something will be executed only after the release action. -
Press: touch/press and hold.
Something will only be executed during the hold action.
Sorry, do you mean that’s what you’re seeing in Figma, or that’s what in theory you should get? I’m talking about what I’m seeing in my Figma file.
For example, a button with “On tap, set variable X to 1” behaves the same in the resulting prototype as “On press, set variable X to 1”.
What you see in Figma and how it works in the real world are the same.
The “On tap” trigger will only fire when you touch and release the button. That is, after you release the button, your action to set the variable will work.
The “While pressing” trigger will only work when you press and hold the button. That is, the variable will be set the moment you hold, not release.
In general, everything is the same as what I wrote in the post above.
These are completely different triggers (gestures) and they work differently. And the fact that they can perform the same actions does not make these triggers similar to each other.
I think it will be useful for you to search the web for information about gestures and study them in more detail.
I’m not sure about how in practice they might be used in a Figma prototype though. For example, when might you use on press compared to on tap? Since they appear to produce the same result when I used them, I’m confused about how you’d choose between the two, and why.
For variable prototyping it doesn’t make any difference because you can’t slowly set a variable throughout a long press event, it just sets it and is done, but it does make a lot of difference for animating between frames and/or component states.
Thanks - so as I thought, there is no difference when setting variables. I can see there’s a difference in when the trigger happens (after release as opposed to immediately), but I’m not sure how I’d use that difference in an animation between frames/states. Can you give an example?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.