Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
How do I rotate a shape but not rotate the text in framer-motion?

I am trying to create a card that rotates 180 degrees and displays another part of the information when it is clicked. However, it does rotate the shape but text are also rotated 180 degree thus it becomes unreadable.

{flip?(<motion.div onClick={()=>{setFlip(!flip)}}
            initial={{
              rotateY:-180
            }}
            animate={{
              rotateY:0
            }}
            whileHover={{scale:1.2}}
           className='card flex flex-col justify-evenly w-3/4 h-max bg-gradient-to-br from-gray-100 to-transparent rounded-l-xl rounded-r-xl shadow-xl z-10 border py-2 px-5 items-center overflow-hidden'>
            <div className="items-center"><img className="border rounded-full w-3/4 mx-auto" src="/myimage.jpeg"></img></div>
            <div className='pt-5'><h1 className="font-semibold">John Doe</h1></div>
            <div><p>SOME BIG DESCRIPTION</p></div>
          </motion.div>):(<motion.div onClick={()=>{setFlip(!flip)}}
            whileHover={{scale:1.2}}
            initial={{
              rotateY:0
            }}
            animate={{
              rotateY:180
              
            }}
            className='card flex flex-col justify-evenly w-3/4 h-max bg-gradient-to-br from-gray-100 to-transparent rounded-l-xl rounded-r-xl shadow-xl z-10 border py-2 px-5 items-center overflow-hidden '>
            <div className="items-center"><img className="border rounded-full w-3/4 mx-auto" src="/myimage.jpeg"></img></div>
            <div className='pt-5'><h1 className="font-semibold">Rotated John Doe</h1></div>
            <div><p>Some Information</p></div>
          </motion.div>)
          
          }
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda