styled components and framer motion code example
Example: styled components framer motion
//Easy way
const MyCustomComponent = styled(motion.div)`
width: 2rem;
background-color: tomato;
`;
//or
//using as
<MyComponent as={motion.div} animate={{ y: 100 }}/>