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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div class="range">
    <span class="lbl-lft">0</span>
    <span class="lbl-rgt">100</span>
    <input type="range" id="range-input" oninput="updateVal(this.value)"/>
    <div id="range-value" class="range-thumb"></div>

  <div class="resize">Resize to width = 768px for fluid slider</div>
              $primary: #626CE4

  font-family: 'Roboto', sans-serif
  -webkit-font-smoothing: antialiased
  text-rendering: optimizelegibility

  box-sizing: border-box

  width: 234px
  height: 48px
  border: 0
  background: $primary
  position: absolute
  top: 45%
  left: 50%
  margin-left: -117px
  &:before, &:after
    content: ''
    position: absolute
    top: 0
    z-index: -1
    height: 100%
    width: 28px
    background: $primary
    pointer-events: none
    left: -28px
    border-radius: 5px 0 0 5px
    right: -28px
    border-radius: 0 5px 5px 0
    -webkit-appearance: none
    position: absolute
    width: calc(100% + 40px)
    height: 100%
    margin: 0
    background-color: transparent
    outline: none
    left: -20px
    -webkit-tap-highlight-color: transparent
      opacity: 0
    &:hover + .range-thumb,
    &:active + .range-thumb
      @media screen and (max-width: 768px)
        transform: translateY(-48px)
        display: block

  position: absolute
  top: -15px
  color: #1a1a1a
  font-size: 12px
  font-weight: 700
  left: -28px
  right: -28px
  text-align: left

  position: absolute
  top: 0px
  margin-left: -24px
  border-radius: 50%
  border: 5px solid $primary
  background: white
  height: 48px
  width: 48px
  outline: none
  transition: transform .3s ease
  text-align: center
  font-size: 12px
  line-height: 38px
  color: #1a1a1a
  font-weight: 700
  pointer-events: none
    display: none
    content: ''
    position: absolute
    z-index: 1
    top: 53px
    left: 50%
    transform: translateX(-50%)
    border-radius: 3px
    width: 2px
    height: 28px
    margin-left: -3px
    background: rgba(white,.25)
    box-shadow: 6px 0 0 rgba(white,.25)
    content: ''
    position: absolute
    bottom: -5px
    left: -5px
    width: 48px
    height: 10px
    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDhweCIgaGVpZ2h0PSIxMHB4IiB2aWV3Qm94PSIwIDAgNDggMTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ3ICg0NTM5NikgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+Q29tYmluZWQgU2hhcGU8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iQXJ0Ym9hcmQiIGZpbGw9IiM2MTY4RTciPgogICAgICAgICAgICA8cGF0aCBkPSJNMTEuMTU0NjA2NCwyLjE4MjkyMDUxZS0xMiBMNC40NzIyMTMwMSwyLjE4MjkyMDUxZS0xMiBDNS40MjIyOTI4NiwxLjA2MTUxMjk4IDYsMi40NjMyOTExMyA2LDQgQzYsNy4zMTM3MDg1IDMuMzEzNzA4NSwxMCAwLDEwIEw0OCwxMCBDNDQuNjg2MjkxNSwxMCA0Miw3LjMxMzcwODUgNDIsNCBDNDIsMi40NjMyOTExMyA0Mi41Nzc3MDcxLDEuMDYxNTEyOTggNDMuNTI3Nzg3LDAgTDQzLjUyNzc4NywyLjE4MjkyMDUxZS0xMiBMMzYuODQ1MzkzNiwyLjE4MjkyMDUxZS0xMiBDMzMuNDYzMzI1NSwzLjEwNDc5MzA5IDI4Ljk1Mjk4NzQsNSAyNCw1IEMxOS4wNDcwMTI2LDUgMTQuNTM2Njc0NSwzLjEwNDc5MzA5IDExLjE1NDYwNjQsMi4xOTQyNDQ3OWUtMTIgWiIgaWQ9IkNvbWJpbmVkLVNoYXBlIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=')
    background-repeat: no-repeat
    background-position: center

  position: fixed
  bottom: 20px
  left: 0
  width: 100%
  text-align: center
  font-size: 14px
  font-weight: 500
  color: #C8CCD4
              var rangeVal = document.getElementById('range-value');
var rangeInp = document.getElementById('range-input');

var updateVal = function(val) {
  rangeVal.innerHTML = val; = val + '%';