Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div class="uk-section">
  <div class="uk-container uk-width-large">
    
    <button class="uk-button uk-button-default uk-position-top-right uk-margin-small-top uk-margin-small-right" uk-toggle="target: .button-label">
      <span class="button-label">Turn off the lights</span>
      <span class="button-label" hidden>Turn on the lights</span>
    </button>

    <div class="uk-card uk-card-default uk-border-rounded uk-margin-large-top">

      <div class="uk-card-body uk-padding-small">

        <div class="guest uk-grid-small uk-flex-bottom uk-flex-left" uk-grid>
          <div class="uk-width-auto">
            <img class="uk-border-circle" width="32" height="32" src="https://getuikit.com/docs/images/avatar.jpg">
          </div>
          <div class="uk-width-auto">
            <div class="uk-card uk-card-body uk-card-small uk-card-default uk-border-rounded">
              <p class="uk-margin-remove">Hey dude!</p>
            </div>
          </div>
        </div>

        <div class="me uk-grid-small uk-flex-bottom uk-flex-right uk-text-right" uk-grid>
          <div class="uk-width-auto">
            <div class="uk-card uk-card-body uk-card-small uk-card-primary uk-border-rounded">
              <p class="uk-margin-remove">Hi brow :)</p>
              <p class="uk-margin-remove">What's up?</p>
            </div>
          </div>
          <div class="uk-width-auto">
            <img class="uk-border-circle" width="32" height="32" src="https://getuikit.com/docs/images/avatar.jpg">
          </div>
        </div>

        <div class="guest uk-grid-small uk-flex-bottom uk-flex-left" uk-grid>
          <div class="uk-width-auto">
            <img class="uk-border-circle" width="32" height="32" src="https://getuikit.com/docs/images/avatar.jpg">
          </div>
          <div class="uk-width-auto">
            <div class="uk-card uk-card-body uk-card-small uk-card-default uk-border-rounded">
              <p class="uk-margin-remove">
                <span class="etc"><i></i><i></i><i></i></span>
              </p>
            </div>
          </div>
        </div>

      </div>

      <div class="uk-card-footer uk-padding-remove">
        <div class="uk-grid-small uk-flex-middle" uk-grid>
          <div class="uk-width-auto">
            <a href="#" class="uk-icon-link uk-margin-small-left" uk-icon="icon: happy"></a>
          </div>
          <div class="uk-width-expand">
            <div class="uk-padding-small uk-padding-remove-horizontal">
              <textarea class="uk-textarea uk-padding-remove uk-border-remove" rows="1" placeholder="Escreva a mensagem..."></textarea>
            </div>
          </div>
          <div class="uk-width-auto">
            <ul class="uk-iconnav uk-margin-small-right">
              <li>
                <a href="#" uk-icon="icon: image"></a>
              </li>
              <li>
                <a href="#" uk-icon="icon: location"></a>
              </li>
            </ul>
          </div>
        </div>
      </div>

    </div>

  </div>
</div>
              
            
!

CSS

              
                .uk-card-small {
  &.uk-card-body {
    padding: 5px 8px;
    font-size: 13px;
  }
}

.uk-border-remove {
  border: 0 none;
}

textarea {
  background: none !important;
  resize: none;
}

@keyframes dot-anim {
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(0, -6px);
  }
  0% {
    transform: translate(0, 0);
  }
}
%etc-pattern {
  width: 6px;
  height: 6px;
  background: #222;
  border-radius: 100%;
  display: inline-block;
  animation: dot-anim 1s infinite linear;
  transform: translate(0, 0);
}

.etc {
  display: block;
  position: relative;
  i {
    @extend %etc-pattern;
    & + i {
      margin-left: 3px;
    }
    &:nth-child(1) {
      animation-delay: .5s;
    }
    &:nth-child(2) {
      animation-delay: .4s;
    }
    &:nth-child(3) {
      animation-delay: .3s;
    }
  }
}

.uk-card {
  position: relative;
  z-index: 1;
}

.guest .uk-card:after, .me .uk-card:after {
  width: 10px;
  height: 45px;
  position: absolute;
  bottom: 0;
}
.guest .uk-card:after {
  background: #fff;
  left: -4px;
  clip-path: polygon(100% 70%, 0% 100%, 100% 100%);
}
.me .uk-card:after {
  background: #1e87f0;
  right: -4px;
  clip-path: polygon(0 70%, 0% 100%, 100% 100%);
}

              
            
!

JS

              
                $('.uk-button').on('click', function (){
  $('.uk-section').toggleClass('uk-dark uk-light');

  $('.uk-container > .uk-card').toggleClass('uk-card-default uk-card-secondary');

  $('html').toggleClass('uk-background-muted uk-background-secondary');
});

              
            
!
999px

Console