Skip to main content
Question

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

  • February 15, 2024
  • 3 replies
  • 432 views

Arra_Arcilla

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?

This topic has been closed for replies.

3 replies

kdme
  • 4 replies
  • February 15, 2024

@Arra_Arcilla

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


Arra_Arcilla

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


kdme
  • 4 replies
  • February 16, 2024

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings