<div id="root"></div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  font-size: 15px;
  font-weight: 400;
}

body {
  width: 100vw;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  font-family: "Exo", Arial, sans-serif;
  background-color: #151522;
  color: #fff;
}

#root {
  display: flex;
  justify-content: center;
  align-items: center;
}

.box {
  width: 30vh;
  aspect-ratio: 1/1;
  background-color: #f36;
}
const { motion } = Motion;

const App = () => {
  return (
    <motion.div
      className="box"
      animate={{
        x: 200,
        y: -100,
        rotate: [0, 360]
      }}
    />
  );
};

ReactDOM.render(<App />, document.getElementById("root"));
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js
  3. https://unpkg.com/framer-motion@1.6.7/dist/framer-motion.js