loading...

re: Animations with the Emotion library VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Is there an advantage of using the keyframes export in emotion over just defining the @keyframes in line with the css?
 

If you were to define it in the CSS it wouldn't be reusable so any place you need to use the animation you would need to duplicate the code. You could then pop it in easily like this:

<div
    css={css`
      animation: ${hop} 1s ease infinite;
    `}
  >
    some bouncing text!
  </div>
 

Ahh I see. I'm just getting into emotion and this post was quiet helpful

Code of Conduct Report abuse