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

              
                <div class="buttonOuterWrap">

<div class="buttonWrap buttonWrapDesign">
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTDv SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">

	<path id="design-icon" d="M3.61,2.1h14.78c0.83,0,1.51,0.68,1.51,1.51v14.78c0,0.83-0.68,1.51-1.51,1.51H3.61c-0.83,0-1.51-0.68-1.51-1.51V3.61
		C2.1,2.78,2.78,2.1,3.61,2.1z"/>

  <polygon id="design-check" fill="#FFFFFF" points="9.89,15.35 5.81,11.27 7.49,9.58 9.89,11.98 14.51,7.36 16.19,9.04 "/>
  
</svg>

</div>

<div class="buttonWrap buttonWrapMotion">
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTDv SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">

	<path id="motion-icon" d="M11,1.26L11,1.26c5.38,0,9.74,4.36,9.74,9.74v0c0,5.38-4.36,9.74-9.74,9.74h0c-5.38,0-9.74-4.36-9.74-9.74v0
		C1.26,5.62,5.62,1.26,11,1.26z"/>

  <polygon id="motion-check" fill="#FFFFFF" points="9.89,15.35 5.81,11.27 7.49,9.58 9.89,11.98 14.51,7.36 16.19,9.04 "/>
  
</svg>

</div>

<div class="buttonWrap buttonWrapFrontend">
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTDv SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">

	<path id="frontend-icon" fill="#000000" d="M4.93,19.76l-4.56-7.89c-0.31-0.54-0.31-1.2,0-1.74l4.56-7.89C5.25,1.7,5.82,1.36,6.44,1.36h9.11
		c0.62,0,1.2,0.33,1.51,0.87l4.56,7.89c0.31,0.54,0.31,1.2,0,1.74l-4.56,7.89c-0.31,0.54-0.89,0.87-1.51,0.87H6.44
		C5.82,20.64,5.25,20.3,4.93,19.76z"/>

  <polygon id="frontend-check" fill="#FFFFFF" points="9.89,15.35 5.81,11.27 7.49,9.58 9.89,11.98 14.51,7.36 16.19,9.04 "/>
  
</svg>

</div>
  
</div>  
              
            
!

CSS

              
                .buttonOuterWrap
  display: flex
  flex-direction: row
  flex-wrap: nowrap
  justify-content: center
  align-items: center
  height: 300px
  
  .buttonWrap
    display: flex
    flex-direction: row
    flex-wrap: nowrap
    justify-content: center
    align-items: center
    cursor: pointer
    width: 3em
    font-size: 3em
    
    svg
      width: 2em

    h2
      margin-left: .5em
              
            
!

JS

              
                var hexInner = "15.41,3.36 19.82,11 15.41,18.64 6.59,18.64 2.18,11 6.59,3.36 15.41,3.36"

var circleInner = "M11,3.26c4.27,0,7.74,3.47,7.74,7.74s-3.47,7.74-7.74,7.74S3.26,15.27,3.26,11S6.73,3.26,11,3.26";
var squareInner = "17.9,4.1 17.9,17.9 4.1,17.9 4.1,4.1 17.9,4.1";


var check = "9.89,15.35 5.81,11.27 7.49,9.58 9.89,11.98 14.51,7.36 16.19,9.04"

MorphSVGPlugin.convertToPath("#motion-check");

var checkSquare = new TimelineMax({paused:true});

var checkCircle = new TimelineMax({paused:true});

var checkHex = new TimelineMax({paused:true});

var t = .5;

checkSquare.to('#design-check', t, {
  morphSVG:{shape:squareInner, shapeIndex:1},
  ease: Elastic.easeInOut.config(2,1)
});
checkSquare.to('#design-icon', t*.5,{opacity:0.2}, "-=.17");

checkCircle.to('#motion-check', t, {
  morphSVG:{shape:circleInner, shapeIndex:3},
  ease: Elastic.easeInOut.config(2,1)
});
checkCircle.to('#motion-icon', t*.5,{opacity:0.2}, "-=.17");

checkHex.to('#frontend-check', t, {
  morphSVG:{shape:hexInner, shapeIndex:3},
  ease: Elastic.easeInOut.config(2,1)
});
checkHex.to('#frontend-icon', t*.5,{opacity:0.2}, "-=.17");


$(".buttonWrapDesign").click( function() {
  if (checkSquare.time() > 0) {
    checkSquare.reverse();
    
  } else {
    checkSquare.play(0);
  }
});

$(".buttonWrapMotion").click( function() {
  if (checkCircle.time() > 0) {
    checkCircle.reverse();
    
  } else {
    checkCircle.play(0);
  }
});

$(".buttonWrapFrontend").click( function() {
  if (checkHex.time() > 0) {
    checkHex.reverse();
    
  } else {
    checkHex.play(0);
  }
})
              
            
!
999px

Console