Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


Auto Save

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.


                <div class="container">

  <svg id="svg" viewBox="0 0 178.6472 178.9135">
    <path id="shield" class="cls-2" d="m160.5509,95.3887c4.577,45.2223-31.7713,59.2456-72.4162,83.5248C47.4898,154.6344,11.1414,140.6111,15.7184,95.3887,21.2675,40.5693,7.6972,20.3925,7.6972,20.3925c0,0,9.7381-2.8608,37.5038-10.0074C74.5865,2.8067,88.1347.0754,88.1347.0754c0,0,13.5376,2.7313,42.9337,10.3097,27.7552,7.1466,37.4927,10.0074,37.4927,10.0074,0,0-13.5697,20.1768-8.0102,74.9962Z" />
    <path id="step5" class="cls-1" d="m131.7132,19.8754c12.9,7.6,22.5,20.8,29.8,35.4,7.2,14.7,12.1,30.8,11.7,47.4-.3,16.7-5.9,33.9-16.6,47.1-10.8,13.2-26.7,22.3-42.8,23.8-16.1,1.6-32.4-4.4-46.9-11.2-14.4-6.7-27-14.2-37.8-24.5-10.7-10.3-19.7-23.4-24.9-38.9-5.1-15.5-6.5-33.4,1.1-46.1,7.5-12.7,24.1-20.2,39.2-26.8,15.1-6.5,28.7-12.1,43.6-13.9,14.8-1.9,30.8.1,43.6,7.7Z" />
    <path id="step4" class="cls-1" d="m132.9132,17.5754c12.2,7.7,19.8,22.8,25,37.9,5.2,15.1,8.1,30.2,7.8,46.1-.4,15.9-3.8,32.6-13.6,44.1-9.7,11.4-25.6,17.7-42.2,23.3-16.6,5.7-33.9,10.8-49.3,7.2-15.3-3.5-28.8-15.6-37.3-29.7-8.4-14.1-11.8-30.1-13.5-46-1.7-16-1.7-31.7,3-46.7,4.7-15,14.2-29.2,27.3-36.5,13.1-7.4,30-7.9,46.8-7.9,16.9-.1,33.7.4,46,8.2Z" />
    <path id="step3" class="cls-1" d="m132.2132,16.9754c12,9.1,19.2,24.2,25.8,39.4,6.7,15.1,12.9,30.3,10.7,44.2-2.2,13.9-12.9,26.3-24.2,37.1-11.2,10.8-23,19.9-36.7,25.1-13.7,5.2-29.3,6.5-45.6,4.5-16.4-2.1-33.5-7.5-42-19.4-8.4-11.8-8.1-30-8.7-46.8-.5-16.9-1.8-32.4,2.8-46.4,4.6-13.9,15.2-26.3,28.2-34.9,13.1-8.6,28.8-13.4,44.9-14.2,16.2-.8,32.9,2.3,44.8,11.4Z" />
    <path id="step2" class="cls-1" d="m132.1132,18.6754c14.6,9.3,28.5,19.8,37.1,34.1,8.7,14.2,12.2,32.3,7,47.1-5.1,14.9-18.8,26.6-30.7,39.5-11.8,13-21.7,27.3-35.6,34.3-14,7.1-31.9,6.9-46.1-.1-14.1-6.9-24.5-20.7-34-33.9-9.6-13.2-18.4-25.9-21.5-40.1-3.1-14.1-.4-29.8,6.3-43.3,6.7-13.4,17.5-24.6,30.2-34.7C57.5132,11.3754,72.2132,2.3754,87.2132,1.8754c15-.5,30.3,7.6,44.9,16.8Z" />
    <path id="step1" class="cls-1" d="m131.6132,18.2754c14.1,10.1,26.8,21.2,34.4,35.3,7.7,14.2,10.3,31.4,6.4,46.5-4,15.2-14.5,28.2-26,39.2-11.5,10.9-23.9,19.7-38.1,25-14.2,5.2-30.1,6.9-44.2,2.6-14.1-4.2-26.4-14.4-37.6-26.2-11.3-11.8-21.5-25.1-24.3-40-2.8-14.8,1.7-31.2,10-44.3,8.3-13.2,20.4-23.2,33.5-33.7C58.7132,12.0754,72.8132,1.0754,87.5132.0754c14.8-1,30.1,8.1,44.1,18.2Z" />

  <div class="block">
    <h2>Lorem ipsum dolor sit amet.</h2>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Dicta, beatae. </p>

  <div class="block">
    <h2>Lorem ipsum dolor sit.</h2>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Sed, voluptatibus! Reiciendis. </p>

  <div class="block third">
    <h2>Lorem ipsum dolor sit amet.</h2>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur.</p>



                body {
  margin: 0;
  background-color: lightslategray;
  font-family: Arial, Helvetica, sans-serif;

.container {
  width: 500px;
  margin: auto;
  z-index: 999;

.block {
  width: 100%;
  border: solid 2px white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

path:not(#step1) {
  display: none;

#svg {
  width: 300px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: visible;
  z-index: -1

path {
  fill: lightcyan;



                gsap.registerPlugin(ScrollTrigger, MorphSVGPlugin);

let blob; // a variable to track the current blob animation
function animateBlob() {
  blob && blob.kill(); // if there's a blob animation, kill it (we're creating a new one next)
  blob = gsap.timeline({
    repeat: -1,
    yoyo: true,
    defaults: { ease: "power1.inOut", duration: 1 }
    .to("#step1", { morphSVG: "#step2" })
    .to("#step1", { morphSVG: "#step3" })
    .to("#step1", { morphSVG: "#step4" })
    .to("#step1", { morphSVG: "#step5" });
// start animating the blob!

// a ScrollTrigger for the 3rd section...
  trigger: ".third",
  start: "-100% center",
  end: "200% center",
  onToggle: (self) => {
    if (self.isActive) {
      // if it's active, kill the current blob animation and morph to the shield shape
      blob && blob.kill();
      blob ="#step1", {
        morphSVG: "#shield",
        ease: "power1.inOut",
        duration: 1
    } else {
      // otherwise, go back to the blob

  trigger: ".container",
  markers: true,
  id: "wat",
  start: 0,
  end: "max",
  snap: 0.5,
  onUpdate: (self)=> {
    console.log(self.progress) // here you can see the values to snap to