Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                
<span class="eee">EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE</span>
<span class="sss">SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 1024">
  <circle fill="currentColor" r="500" cx="720" cy="512" />
  <path transform="translate(-220 0)" id="e-path" fill="none" d="M720,1024 C720,889.484375 675.653646,813.330729 586.960938,795.539062 C453.921875,768.851562 402.460938,586.335938 508.289063,490 C578.841146,425.776042 595.9375,359.21875 559.578125,290.328125"/>
  <path transform="translate(-220 0)" id="e-morph" fill="none" d="M720,1024 C788.791667,856.817708 778.841146,764.330729 690.148438,746.539062 C557.109375,719.851562 664.878831,600.242188 585.791621,512 C533.066814,453.171875 546.042523,379.28125 624.71875,290.328125"/>

    <path transform="translate(100 0)" id="s-morph" fill="none" d="M720,1024 C720,889.484375 675.653646,813.330729 586.960938,795.539062 C453.921875,768.851562 402.460938,586.335938 508.289063,490 C578.841146,425.776042 595.9375,359.21875 559.578125,290.328125"/>
    <path  transform="translate(100 0)" id="s-path" fill="none" d="M720,1024 C788.791667,856.817708 778.841146,764.330729 690.148438,746.539062 C557.109375,719.851562 664.878831,600.242188 585.791621,512 C533.066814,453.171875 546.042523,379.28125 624.71875,290.328125"/>

</svg>

              
            
!

CSS

              
                body {
  height: 100vh;
  width: 100vw;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

svg {
  display: block;
  width: 400px;
  color: #e6f03a;
  
  path {
    visibility: hidden;
  }
}

.eee, .sss {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 400px;
  width: 400px;
  margin: auto;
  visibility: hidden;
  color: #fff;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.e-char, .s-char {
  position: absolute;
  font-size: 50px;
  font-weight: 900;
  will-change: transform;
  // text-shadow: 1.5px 1.5px 0px #000, -1.5px -1.5px 0px #000, -1.5px 1.5px 0px #000, 1.5px -1.5px 0px #000;
 -webkit-text-stroke: 1.5px #000;
}
              
            
!

JS

              
                console.clear();

gsap.registerPlugin(
  MotionPathPlugin, 
  // MorphSVGPlugin, 
  SplitText
);

const eText = new SplitText('.eee', {type:"chars", charsClass: "e-char" });
const sText = new SplitText('.sss', {type:"chars", charsClass: "s-char" });
const text = [...eText.chars, ...sText.chars];

gsap.set(text, { clearProps: "all" });
gsap.set(text, { scale: 0.4 });
gsap.set(['.eee', '.sss'], { autoAlpha: 1 });

const eMotionPath = {
  path: '#e-path',
  align: '#e-path',
  start: 0,
  autoRotate:true,
  end: gsap.utils.distribute({
    base: 0,
    amount: 1, 
    ease:'linear'
  })
};

const sMotionPath = {
  ...eMotionPath,
  path: '#s-path',
  align: '#s-path'
};

const eMotionPathEnd = {
  ...eMotionPath,
  path: '#e-morph',
  align: '#e-morph'
};

const sMotionPathEnd = {
  ...eMotionPath,
  path: '#s-morph',
  align: '#s-morph'
};


const intro = gsap.timeline({ defaults: {
    duration: 2,
    ease: 'power3.inOut',
    scale: gsap.utils.distribute({
      base: 0.4,
      amount: 1, 
    })
  }})
  .to(eText.chars, { motionPath: eMotionPath }, 0)
  .to(sText.chars, { motionPath: sMotionPath }, 0)
  .progress(1);

// gsap.set('#e-path', { morphSVG: '#e-morph' });
// gsap.set('#s-path', { morphSVG: '#s-morph' });
gsap.set(eText.chars, { motionPath: eMotionPathEnd });
gsap.set(sText.chars, { motionPath: sMotionPathEnd });

const wiggle = gsap.timeline();

text.forEach(element => {
  
  const props = gsap.getProperty(element);
  
  wiggle.to(element, {
    duration: 1.5,
    repeat: -1, 
    yoyo: true,
    ease: 'power2.inOut',    
    x: props("x"),
    y: props("y"),
    rotation: props("rotation"),
  }, 0);    
});

gsap.timeline()
  .add(intro.progress(0))
  .add(wiggle)

              
            
!
999px

Console