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.


                - const colors = ['#db0a5b', '#fef160', '#23cba7']
.block-reveal(style='--reveal-speed: 0.75')
  - const phrase = 'Block reveal effect!'
  each word, index in phrase.split(' ')
    span(style=`--delay: 1.${index}; --color: ${colors[index]}`)= word
button restart


  box-sizing border-box

  background-color #fff
  text-align center
  font-family 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif
  min-height 100vh
  display flex
  align-items center
  justify-content center

  --base-delay 0.5
  --reveal-speed 0.5
  --stagger 0.1

  position fixed
  top 1rem
  left 1rem
  background 0
  opacity 0.5
  border 0
  cursor pointer
  transition opacity .15s ease
  font-weight bold
  letter-spacing 2px

    opacity 1

  align-items flex-start
  display inline-flex
  flex-direction column

    animation show-text calc(var(--reveal-speed, 0.5) * 1s) calc(var(--delay) * 1s) steps(1) both
    font-size 4rem
    font-weight bold
    overflow hidden
    position relative

      content ''
      top 0
      right 0
      bottom 0
      left 0
      background var(--color, dodgerblue)
      position absolute
      animation block-reveal calc(var(--reveal-speed, 0.5) * 1s) calc(var(--delay) * 1s) both

@keyframes block-reveal
    transform translate(-110%, 0)
  45%, 55%
    transform translate(0, 0)
    transform translate(110%, 0)

@keyframes show-text
    color transparent
  50%, 100%
    color #000



  * Purely for restarting the animation 
const button = document.querySelector('button')
const restart = () => {
  const blocks = document.querySelector('.block-reveal')
  const newBlocks = blocks.cloneNode(true)
button.addEventListener('click', restart)