Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

framer motion styled components

import styled from "styled-components";
import { motion } from "framer-motion";

const AnimatedDiv = styled(motion.div)`
  background-color: rebeccapurple;
  width: 200px;
  height: 200px;
`;

//Use in component like:
<AnimatedDiv animate={{ scale: 3 }} />
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #framer #motion #styled #components
ADD COMMENT
Topic
Name
2+1 =