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.


                - var panels = ["<p>Hey</p><p>Let`s</p><p>Dance</p>", "<p>Give</p><p>Take</p><p>Receive</p>", "<p>Experience</p><p>It</p><p>Today</p>", "<p>Give</p><p>All</p><p>You can</p>", "<p>Life</p><p>In</p><p>Motion</p>"];

each panel, index in panels
  .panel(class='panel--' + (index + 1)) !{panel}



  box-sizing: border-box
  background: #ffc600
  font-family: 'helvetica neue'
  font-size: 20px
  font-weight: 200

  display: flex
  margin: 0
  min-height: 100vh
  overflow: hidden

  box-sizing: inherit

  display: flex
  flex: 1
  flex-direction: column
  align-items: center
  justify-content: center
  color: #fff
  font-size: 20px
  text-align: center
  background: #fb0f9c
  background-size: cover
  background-position: center
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.1)
    font-size .7s cubic-bezier(0.61, -0.19, 0.7, -0.11),
    flex .7s cubic-bezier(0.61, -0.19, 0.7, -0.11),
    background .2s
  > *
    display: flex
    flex: 1 0 auto
    justify-content: center
    align-items: center
    margin: 0
    width: 100%

    transition: transform .5s

    font-family: 'Amatic SC', cursive
    font-size: 2rem
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.72), 0 0 14px rgba(0, 0, 0, 0.45)
    text-transform: uppercase
      font-size: 4rem

      transform: translateY(-100%)
      transform: translateY(100%)
  &--open-active > *
    transform: translateY(0) !important

    flex: 5
    font-size: 40px
  backgrounds = '',
  for bkg, index in backgrounds
    &--{index + 1}
      background-image: s("url(%s)" % bkg)



                const panels = document.querySelectorAll('.panel');

function toggleOpen() {

function toggleActive(ev) {
  if (ev.propertyName.includes('flex')) {

panels.forEach(p => p.addEventListener('click', toggleOpen));
panels.forEach(p => p.addEventListener('transitionend', toggleActive));