I would like to trigger consequences based on :
A) How long the user has been inactive (absence of mouse movement on Desktop or scroll on Mobile)
B) How long a property's value stays unchanged.
Example : I'm building this prototype where a scrollbar is supposed to disappear after a certain time if the user stops interacting with the prototype. To do so, I would have liked to be able to do something like :
  • Detect x value of scrollbar, if x value doesn't change for 4s, then drop opacity to 0.
  • When x value changes again, bring opacity to 100