How to animate page slide toggle with different height in framer-motion
I want to implement a page animation with framer-motion. The page should slide from right side and slide back to the right side when it gets toggled as you can see in the picture
The important part here is the height of the page container schould adapt the height and there should also be a smooth height transition. Since the page content is dynamic the height animation should not rely on fixed heights
The "page-blue" is positioned absolute to the top and animates in the x-axis if page === 2. Wait why initial={false}? This prevents the initial animation (which is obvious ^^) and of course I would recommend you to use the same transition obj as above. Propably it makes sense to have a const here π