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.




                custom_time_func = cubic-bezier(.38,.24,.28,1.17)

  display flex
  width 100vw
  height 100vh
  justify-content center
  align-items center
  background #F2F2F2
    background white
    width 180px
    height 96px
    border-radius 24px
    box-shadow 0px 64px 96px rgba(0,0,0,0.05)
      cursor pointer
      width 72px
      height 72px
      margin-left 96px
      margin-top 12px
      background #7DD451
      border-radius 16px
      box-shadow 0px 4px 4px rgba(125,212,81,0.2)
        background transparent
        transform rotate(45deg)
        position absolute
        margin-left 44px
        margin-top 11px
          background white
          width 8px
          height 40px
          margin-left 12px
          position absolute
          background white
          width 20px
          height 8px
          margin-top 32px
          position absolute
  transform scale(0.9)
  margin-left 12px !important
  background #E5E5E5 !important
  box-shadow 0px 4px 4px rgba(0,0,0,0.05) !important
  background #E5E5E5 !important
 // Sorry for that...
   transition all 0.3s custom_time_func


                // Get elements
let btn = document.getElementById("btn")
let checkbox = document.getElementById("checkbox")
let rect1 = document.getElementById("rect1")
let rect2 = document.getElementById("rect2")

// Set events
btn.addEventListener("mousedown", animeDown)
btn.addEventListener("mouseup", animeUp)

// CSS toggle functions
function animeDown() {

function animeUp() {