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.


<section class="description panel blue">
      <h1>Basic Pin</h1>
      <p>You can <strong>pin</strong> an element while the ScrollTrigger is active which basically make it stick in place while the scroll position is between the <code>start</code> and <code>end</code> elements/values</p>
      <div class="scroll-down">Scroll down<div class="arrow"></div></div>

  <section id="orange" class="panel orange align-top">
      <p id="orange-content"><code>start: "top top"</code> triggers when the orange element's <strong>top edge</strong> hits the <strong>top</strong> of the viewport. <code>end:&nbsp;"bottom&nbsp;150px"</code> stops pinning when the <strong>bottom</strong> of the orange element hits <strong>150px</strong> down from the top of the viewport (measurements are relative to the top).</p>

  <section id="red" class="panel red align-top">
    <p id="red-content"><code>start: "top center"</code> pins this element when the <strong>top</strong> of the red element hits the <strong>center</strong> of the viewport, and remains pinned for 200px because its <code>end</code> is defined as <code>"+=200"</code></p>
  <section class="panel purple">
      Easy Peasy!

   <a href="">
     <img class="greensock-icon" src="" width="200" height="64" />





  trigger: "#orange",
  start: "top top", 
  end: "bottom 150px",
  pin: "#orange-content"

  trigger: "#red",
  start: "top center", 
  end: "+=200", // 200px past the start 
  pin: "#red-content"