<MyComponent as={motion.div} animate={{ y: 100 }} />const MyCustomComponent = styled(motion.div)`
width: 2rem;
background-color: tomato;
`;<div>
<MyCustomComponent drag />
<MyCustomComponent animate={{ opacity: 1 }} />
</div><MyComponent as={motion.div} animate={{ y: 100 }} />const MyCustomComponent = styled(motion.div)`
width: 2rem;
background-color: tomato;
`;<div>
<MyCustomComponent drag />
<MyCustomComponent animate={{ opacity: 1 }} />
</div>