Skip to content

Instantly share code, notes, and snippets.

@sidd
Created September 2, 2022 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidd/49d9b028653dd7978d8c8042ccd00d7e to your computer and use it in GitHub Desktop.
Save sidd/49d9b028653dd7978d8c8042ccd00d7e to your computer and use it in GitHub Desktop.
const variants = {
initial: {
height: 0,
},
animate: {
height: 'auto',
},
}
// ...
return (
<motion.div
className="z-50 bg-eggplant fixed inset-0 text-white p-6 overflow-auto"
initial="initial"
animate="animate"
exit="initial"
variants={variants}
transition={{ duration: 0.5 }}
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment