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.


                <svg viewBox="0 0 144 144">
  <a class="button js-button" xlink:href="" target="_blank">
    <polygon class="js-button-shape" points="144,72 144,48 0,48 0,72 0,96 72,96 144,96" data-to="90,76 90,24 54,24 54,76 24,76 72,124 120,76"/>
    <g class="js-button-text">
      <text x="72" y="72" text-anchor="middle" dominant-baseline="central" class="button-text">
    <rect x="0" y="0" width="144" height="144" fill-opacity="0"/>


                .button {
  cursor: pointer;
  fill: #456bd9;
  transition: fill 300ms ease;

.button:focus {
  fill: #5A7BDD;

.button-text {
  fill: #ffffff;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 18px;
  font-weight: 600;

/* Demo scaffolding stuff */

html {
  height: 100%;

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;

svg {
  width: 50%;
  max-width: 288px;


                // Select the elements we'll be using
var button = document.querySelector('.js-button');
var buttonShape = button.querySelector('.js-button-shape');
var buttonText = button.querySelector('.js-button-text');

// Store the "to" and "from" states of button shape
var shapeFrom = buttonShape.getAttribute('points');
var shapeTo = buttonShape.getAttribute('data-to');

// Common animation properties
var duration = 0.3;
TweenLite.defaultEase = Cubic.easeInOut;

// Create our animation timeline
var timeline = new TimelineMax({ 
  paused: true // Do not start playing right away

// Add our tweens (both happening at the same time)
  // Morph the button shape, duration, {
    attr: { points: shapeTo }
  // Scale the text, duration, {
    scale: 0,
    transformOrigin: '50% 50%'

// Control the animations based on events
button.addEventListener('mouseenter', function(){;
button.addEventListener('mouseleave', function(){