using framer motion with styled components 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 }}/>