Jump to content
Search Community

Implement draggable bottom sheet modal with gsap

oskr test
Moderator Tag

Recommended Posts

9 hours ago, ZachSaucier said:

Hey oskr and welcome to the GreenSock forums.

 

By "this draggable effect" do you mean the drawer component coming up from the bottom? You can create that simply by creating a Draggable with type: "y" and imposing the bounds that you need.

Thanks for your response, I want to create the draggable modal

A small part of the modal showing, when the user drag that modal above a threshold

it pops up (like the image above).
I'm stuck at this:

See the Pen oNLjjNN by omar2205 (@omar2205) on CodePen

Link to comment
Share on other sites

1 minute ago, ZachSaucier said:

It's just a pen to get you started :) You probably want to use the onDrag event instead. Also likely want to add snapping so that it can't end up in a partial state.

Thanks for the help. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...