Is it possible to create a screen where the number increases when pressed and goes back to 0 when released?

I want to create a screen where the numbers go up or continuously increase while pressed and goes back to zero when released that does not skip all the way to 0. Any ideas how to do it?


here’s a Figma prototype

The file is here

A bit buggy, so be sure to move the cursor while you are pressing for the counter to start.

this counts to 10 then reset to 1 ad infinitum when pressed. You can extend that to whatever number in the file.

Just check the file for how it works.

  1. You have 2 frames called counter-idle and counter-start.
  2. When counter-idle is pressed if smart-animates to counter-start
  3. when released it transitions back to counter-idle.
  4. be sure to check reset component state

counter-idle has a component zero that has the text ‘0’ in it

counter-start has a component called numbers in it.

the components zero and number are text wrapped in a frame that are the exact same size.

numbers transitions to through its variants after a delay of 1.5s

unfortunately the press and release did not work in your prototype. :frowning:


What are you talking about. It works