Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h1>MotionPathPlugin (new in GSAP 3)</h1>

<svg width="100%" height="100%" viewBox="-20 0 557 190" id="svg">
	<circle cx="100" cy="100" r="3" />
	<circle cx="300" cy="20" r="3" />
	<path id="path" xmlns="" d="M0 1H319.529C351.686 2.23281 416 21.9886 416 91.1494C416 160.31 416 433.101 416 560.851C416 590.9 393.745 651 304.726 651C215.707 651 178.31 651 115.357 651" stroke="url(#paint0_linear)" stroke-opacity="0.5" stroke-width="2"/>
	<g id="rect">
		<svg xmlns="" width="40" height="40" viewBox="0 0 40 40" fill="none"><circle cx="20" cy="20" r="20" fill="#FFE31B" fill-opacity="0.05"/><circle cx="20" cy="20" r="19.5" stroke="#FFE31B" stroke-opacity="0.2"/><circle cx="20" cy="20" r="10.3197" fill="#FFE31B" fill-opacity="0.1" stroke="#FFE31B"/><g filter="url(#filter0_d)" style="&#10;    filter: none;&#10;"><circle cx="19.6721" cy="20.3279" r="3.27869" fill="#FFE31B"/></g><defs><filter id="filter0_d" x="11.3934" y="16.0492" width="16.5574" height="16.5574" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.5"/></filter></defs></svg>

<link href='//,400' rel='stylesheet' type='text/css'>


                html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
h1 {
  color: white;
#rect text {
  pointer-events: none;

body {
  background-color: black;
  color: #999;
  font-family: "Signika Negative", Arial, sans-serif;
  font-weight: 300;
  font-size: 17px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

svg {
  overflow: visible;
  height: 20%;
  /* Fix Safari rendering bug */
  transform: translateZ(0);

path {
  stroke-width: 2;
  stroke: gray;

a {
  color: #88ce02;
  text-decoration: none;
a:hover {
  text-decoration: underline;



                //register the plugin (just once)

let motionTween ="#rect", {
  paused: true,
  ease: "none",
    path: "#path",
    align: "#path",
    autoRotate: true,
    alignOrigin: [0.5, 0.5]

  .to(motionTween, {
    duration: 1,
    progress: 0.5
  .to(motionTween, {
    duration: 1,
    progress: 0.6
  }, "+=1")
  .to(motionTween, {
    duration: 1,
    progress: 0.7
  }, "+=1");