Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

361
Visualizações
Start multiple animations simultaneously in Framer Motion

I'm new to Framer Motion (and animations in general) and am trying to replicate the below GSAP effect

https://codepen.io/cameronknight/pen/pogQKwR

I can achieve the reveal effect and scale effect individually, but when applying both animations, only one of the animation triggers, and the remainder of the second animation only triggers after the first has completed.

I've tried altering the delay, duration etc. but to no avail, and was wondering if there was any alternative method to trigger both animations at the same time (or with very minimal delay).

The code can be found below:

I have a motion image element, and a motion div element on top styled to be the exact same dimensions on top of the image element. An X transformation is applied to the motion div element to achieve the reveal effect. I then tried to apply a scale effect to the motion image element, and this is where the problem occurs.

function App() {

  const overlayVariant = {
    start: {
      x: "0%", 
      opacity: 1,
    },
    end: {
      x: "100%",
      transition: {
        delay: 0.5, 
        duration: 1, 
        ease: "easeInOut"
      }
    }
  }

  const imageVariant = {
    start: {scale: 1.1},
    end: {
      scale: 1,
      transition: {
        delay: 0.5, 
        duration: 1, 
        ease: "easeOut"
      }
    }
  }


  return (
    <main className="app-container">
      <section className="app-contents">
        <div className="app-image">
          <motion.div 
            className="image-overlay"
            variants={overlayVariant}
            initial="start"
            animate="end"
            >
          </motion.div>
          <motion.img 
            src={image} 
            variants={imageVariant}
            whileHover="hover"
            transition={{duration: 0.6, ease: [0.43, 0.13, 0.23, 0.96]}}
            initial="start"
            animate="end"
            />
        </div>
      </section>
      
    </main>
  );
}

Thank you advance, and I would appreciate any help I could get.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda