I am trying to do a demo so that the this blue layer will slide down to where the user clicks (each clickable area is a 1 of 7 layers created in array).
I've searched a while and I couldn't find any way to get it to work.I thought I could map the position to array[i].y but that doesn't work.
Any help would be appreciated.
You forgot to pass the index as a parameter. Another little thing you need to account for is the spacing between the top of the screen and the scroll bar, when setting the y position. Here’s a fixed version of your prototype — https://framer.cloud/CRLCX/