Is there a way to apply a class using Framer Motion tag in the animate
and initial
props? Here's an example:
<motion.div
initial={{ className: 'hidden' }}
animate={{ className: 'visible' }}
>
<div>yo</div>
</motion.div>
I need to use classes because I am incorporating tailwindcss into my project.
The issue is, when I try the method above, it just adds style="class-name:{class_name}"
in the generated HTML tag, which has no effect. Any suggestions?
Thank you in advance.