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.


                <svg width="100%" height="100%" viewBox="0 0 700 700">
  <line x1="0" x2="600" y1="501" y2="501" stroke="#ccc" stroke-width="2" style="opacity:0.3" />
  <line x1="0" x2="600" y1="100" y2="100" stroke="#ccc" stroke-width="2" style="opacity:0.3" />
  <path id="startEase" fill="none" stroke="#336633" stroke-width="3px"/>
  <path id="endEase" fill="none" stroke="#663333" stroke-width="3px"/>
  <path id="blendedEase" fill="none" stroke="white" stroke-width="4px" style="opacity:0.7"/>
  <circle id="ball" fill="blue" r="20" cx="650" cy="500"/>
<div id="data"></div>


                body {
  background-color: black;
svg {
  top: 50%;
  left: 50%;
  z-index: -1;
  overflow: visible;
  transform: translate(-50%,-50%);
#data {
  color: #ccc;
  position: fixed;
  bottom: 10px;
  left: 40px;
  right: 40px;
  text-align: center;
  font-family: courier, monospace;

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


                //Blend 2 eases together easily. Just change the startEase and endEase variables below to whatever you want, and it'll blend them.
//Click the "CustomEase" link at the bottom to jump right to the Ease Visualizer with this ease plotted!
//Notice you can even click on the white (mixed) path and it's editable. ;)

var startEase = Power1.easeIn; //green line
var endEase = Back.easeOut; //red line
var pathSimplification = 3; //a higher number simplifies the resulting path more.
var blender = Power4.easeInOut; //an ease that controls how the blending happens over time. Linear.easeNone, for example, would linearly (slowly) blend them, but Power4.easeInOut preserves more of the beginning and ending eases at the tail ends, aggressively mixing them in the middle.

var blended = new Ease(function(v) {
  var b = blender.getRatio(v);
  return startEase.getRatio(v) * (1 - b) + endEase.getRatio(v) * b;
});"#ball", 2, {y:-400, ease:blended});

//graph the lines...
CustomEase.getSVGData(startEase, {width:600, height:400, y:100, path:"#startEase"});
CustomEase.getSVGData(endEase, {width:600, height:400, y:100, path:"#endEase"});
CustomEase.getSVGData(blended, {width:600, height:400, y:100, path:"#blendedEase"});

//simplify the path and make it editable! (PathEditor is an unpublished tool from GreenSock)
PathEditor.simplifySVG("#blendedEase", {tolerance:pathSimplification});
var editor = PathEditor.create("#blendedEase", {draggable:false, selected:false, onUpdate:displayData});

//this is just to display the path data
var data = document.getElementById("data");
function displayData(d) {
  var s = editor.getNormalizedSVG();
  data.innerHTML = '<a href="' + s + '" target="_blank">CustomEase</a>.create("mixed", "' + s.split(",").join(", ") + '");';

/* if you're just looking for a simple function, here ya go...

//just feed in the starting ease and the ending ease (and optionally an ease to do the blending), and it'll return a new Ease that's...blended!
function blendEases(startEase, endEase, blender) {
	blender = blender || Power4.easeInOut;
	return new Ease(function(v) {
	  var b = blender.getRatio(v);
	  return startEase.getRatio(v) * (1 - b) + endEase.getRatio(v) * b;

//usage:"#target", 2, {
  x: 100, 
  ease: blendEases(Back.easeIn.config(1.2), Bounce.easeOut)