Jump to content
Search Community

kanishk soni

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by kanishk soni

  1. import React, { useEffect, useRef, useState } from "react";
    import { motion } from "framer-motion";
    import mypic from "../public/images/Untitled-transformed.jpeg";
    import video from "../public/Videos/workportfilio.mp4";
    import { useGSAP } from "@gsap/react";
    import gsap from "gsap";
    import { ScrollTrigger } from 'gsap/ScrollTrigger';
    
    const Home = () => {
    
     const aboutsectiontextanimtion = useRef();
     const parentofaboutsectiontextanimtion = useRef()
      
      useEffect(() => {
        if (aboutsectiontextanimtion.current && parentofaboutsectiontextanimtion.current) {
          gsap.to(aboutsectiontextanimtion.current, {
            x: '30vw',
            scrollTrigger: {
              trigger: aboutsectiontextanimtion.current,
              scroller: parentofaboutsectiontextanimtion.current,
              scrub: 1,
              start: "top middle",
              end: "+=90",
              markers: true,
              pin: true,
              
            }
          });
        }
      }, []);
    
     return (
     <div ref={parentofaboutsectiontextanimtion} className="bg-blue-500 h-[140vh] rounded-lg w-full">
                    <div ref={aboutsectiontextanimtion} className="text-7xl">acavasvasv</div>
                  </div>
                </div>
                )
                

     

     

    i reinstall all require node pacakges but it still not owrking

  2. 13 hours ago, Rodrigo said:

    Hi,

     

    This seems related to the fact that you're using height: 100% in all your elements. Better use 100vh, that seems to work the way you intend:

     

     

     

    Finally it seems that you posted here as well:

     

    If you create a new thread there is no need to post in other threads, is better to keep everything focused on just one thread, so if it's OK I'll go ahead and delete that post so we can track this one instead.

     

    Hopefully this helps.

    Happy Tweening!

    thank you again 

  3. 13 hours ago, Rodrigo said:

    Hi @kanishk soni,

     

    Unfortunately there is no codepen link in your post and I don't see anything odd in the code you pasted. The only suggestion would be use vh instead of height: 100% and adding a height to the html and body elements.

     

    If you keep having issues, remember to include a minimal demo.

    Happy Tweening!

    thank you very much

×
×
  • Create New...