Locking Drag. The item slides off the page

Have you searched the Docs and Knowledge base?
Principle Version: 5.8
macOS Version:
Sketch Version: NA
Description of what you need help with: Locking Drag

Steps to reproduce the behavior:

  1. I have a scroll on a page and a drag. Both need to work. but the drag keeps sliding off the page. Can i lock it at a certain height?

I am looking for help with a slide and a drag in a model.

I have a background that slides. This works just fine.

The bottom sheet is set on a vertical drag. It can be dragged all the way off the page on the top or the bottom.

I would like to ‘lock’ the bottom sheet so it can’t be moved beyond the base.

Screenshots/Sketch File/Principle file: (if applicable)

Do you mind sharing the file or at least an animation so we can understand a bit better the situation? It’s a bit tricky to guess how your layers are positioned and what are you trying to achieve without it.

Without looking at it, I’d say using a scroll and a drag together might be tricky, but I’d need the project file to help you.

Here is the file.

I would like to keep the bottom sheet from sliding beyond its own height.


Oh, I got you.

You can use the drivers to adjust the ‘bottom’ CenterY value as the drag go up, I just extended it very far so it keeps the position. Same thing for dragging it down, you can adjust the CenterY value again to avoid going under the minimum level.


Thank you! Your model works great but i can’t emulate.
Please can you write the first couple steps?


I can set the ‘keyframes’ to the center-y but it is not locking.

This is where i got to https://drive.google.com/open?id=1N6FSZQ9C7SJx4jy8t4lH58smgKQwt4mG

I can’t see where i am going wrong


You have done well, basically you need to add more keyframes in case the user keeps dragging up the panel and keep the CenterY position in a value that makes the panel be in the same place.

Hope this video helps.

Video link (Dropbox)

Thank you!!!
I understand how it works.
I really appreciate the time you took to help me out!

Thank you so much!


1 Like