123

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm 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. We'll also process your JavaScript with Babel.

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

Code Indentation

     

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.

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.

            
              //https://dribbble.com/shots/5967166-Lock-Micro-Interaction-007

input#inpLock(type='checkbox')
label.btn-lock(for='inpLock')
  svg(width='36', height='40', viewBox='0 0 36 40')
    path.lockb(d='M27 27C27 34.1797 21.1797 40 14 40C6.8203 40 1 34.1797 1 27C1 19.8203 6.8203 14 14 14C21.1797 14 27 19.8203 27 27ZM15.6298 26.5191C16.4544 25.9845 17 25.056 17 24C17 22.3431 15.6569 21 14 21C12.3431 21 11 22.3431 11 24C11 25.056 11.5456 25.9845 12.3702 26.5191L11 32H17L15.6298 26.5191Z')
    path.lock(d='M6 21V10C6 5.58172 9.58172 2 14 2V2C18.4183 2 22 5.58172 22 10V21')
    path.bling(d='M29 20L31 22')
    path.bling(d='M31.5 15H34.5')
    path.bling(d='M29 10L31 8')
            
          
!
            
              .btn-lock
  position absolute
  top calc(50% - 32px)
  left calc(50% - 32px)
  display inline-block
  background #FF5B5B
  width 64px
  height 64px
  box-sizing border-box
  padding 12px 0 0 18px
  border-radius 50%
  cursor pointer
  -webkit-tap-highlight-color transparent
  //transform scale(.75)
  svg
    fill none
    transform translate3d(0,0,0)
    .bling
      stroke white
      stroke-width 2.5
      stroke-linecap round
      stroke-dasharray 3
      stroke-dashoffset 15
      transition all .3s ease
    .lock
      stroke white
      stroke-width 4
      stroke-linejoin round
      stroke-linecap round
      stroke-dasharray 36
      transition all .4s ease
    .lockb
      fill white
      fill-rule evenodd
      clip-rule evenodd
      transform rotate(8deg)
      transform-origin 14px 20px
      transition all .2s ease

#inpLock
  display none
  &:checked + label
    background #20CCA5
    svg
      opacity 1
      .bling
        animation bling .3s linear forwards
        animation-delay .2s
      .lock
        stroke-dasharray 48
        animation locked .3s linear forwards
      .lockb
        transform rotate(0)
        transform-origin 14px 22px
      
@keyframes bling
  50%
    stroke-dasharray 3
    stroke-dashoffset 12
  100%
    stroke-dasharray 3
    stroke-dashoffset 9
    
@keyframes locked
  50%
    transform translateY(1px)
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console