Jump to content
Search Community

how to create such an animation when clicking on a block so that it expands to the full width and height of the site

aidtemirov test
Moderator Tag

Recommended Posts

Hi @aidtemirov and welcome to the GreenSock Forums!

 

It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or Stackblitz that demonstrates the issue? 

 

Please don't include your whole project. Just some colored <div> elements and the GSAP code is best. See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer.

 

Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo

See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen

 

Using a framework/library like React, Vue, Next, etc.? 

CodePen isn't always ideal for these tools, so here are some Stackblitz starter templates that you can fork and import the gsap-trial NPM package for using any of the bonus plugins: 

 

Please share the StackBlitz link directly to the file in question (where you've put the GSAP code) so we don't need to hunt through all the files. 

 

Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. 

Link to comment
Share on other sites

Epica 
1. I want to implement such an animation on the site when clicking on a product card. It expands to the full width and height of the screen and takes you to the next page. Does GSAP have ready-made solutions? may be ready library

 

2 When hovering over blocks, they change their width and height, that is, they are elastic

Link to comment
Share on other sites

Hi,

 

For enlarging something to use the entire screen, the Flip Plugin is the tool you need:

https://greensock.com/docs/v3/Plugins/Flip

 

Here you can see some examples:

https://codepen.io/collection/nqvwmG

 

For the second part, that is far more complicated as it involves a lot of moving parts as you can see in this example:

See the Pen PoemLdj by jeffceriello (@jeffceriello) on CodePen

 

Unfortunately we don't have anything like that in our collection right now and we don't have the time resources to create such complex solutions for our users. If you want you can hire us on a consulting basis or post in the Jobs & Freelance forums in order to get help there.

 

Good luck with your project! 👍

Happy Tweening!

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...