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

171
Visualizações
How add multiple axis value in css unit in framer motion?

I am using framer motion in react and I need to make it responsive in different animated positions.

  const welcomeBallVariants = {
    visible: {
      x: [0, 0, -100, -50, 100, 50, -75],
      y: [0, 500, 300, 500, 300, 500, 347],
      rotate: 360,
      transition: {
        duration: 1,
        rotate: {
          duration: 1,
          repeat: 3,
          type: "tween",
          ease: "linear",
        },
        delay: 1.5,
      },
    },
  };

here is my component code

<motion.img
            src={WelcomePageBall}
            alt="WelcomePageBall"
            variants={welcomeBallVariants}
            initial="hidden"
            animate="visible"
          />

this is the motion code I just wanted to add axis value with CSS units in vh and vw but it didn't work. I just want to make the animation responsive on any window, so any kind of suggestion may help.

I want to add the below value to my axis

x:["0vw", "100vw"]
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