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.


                <div class="container">
  <button class="button">
    <i class="icon-send material-icons">send</i>
    <i class="icon-check material-icons">check</i>
    <span class="button-text">Send Msg</span>


                * {
  box-sizing: border-box;

html {
  font-size: 62.5%;

body {
  font-family: Roboto;

.container {
  padding-top: 80px;
  display: flex;
  justify-content: center;
  align-items: center;

.button {
  background-color: #4E3CC8;
  padding: 16px 32px;
  border-radius: 32px;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 170px;
  outline: none;
  border: none;
  box-shadow: 0px 2px 6px #4E3CC8;
  position: relative;
  &-text {
    transition: transform 200ms ease;
    &.loading:after {
      overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  -webkit-animation: ellipsis steps(4,end) 900ms infinite;      
  animation: ellipsis steps(4,end) 900ms infinite;
  content: "\2026"; /* ascii code for the ellipsis character */
  width: 0px;
  i {
    font-size: 1.8rem;
  .icon-send {
    margin-right: 10px;
    transition: 400ms ease;
  .icon-check {
    margin-right: 10px;
    opacity: 0;
    position: absolute;
    left: 60px;
    transform: translateY(-80px);
    transition: 200ms ease;

.notransition {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;

@keyframes ellipsis {
  to {
    width: 20px;    

@-webkit-keyframes ellipsis {
  to {
    width: 20px;    

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: 'liga';


                const sendButton = document.querySelector('.button');

sendButton.addEventListener('click', handleClick);

function handleClick() {
  const buttonText = this.querySelector('.button-text');
  const sendIcon = this.querySelector('.icon-send'); = `scale(0.5) translateX(-200px)`;
  buttonText.textContent = 'Sending';
  buttonText.classList.add('loading'); = `translateX(-10px)`;
  //fake loading state
  setTimeout(() => { = `translateY(80px)`;
     = `1000ms ease 230ms`; = `scale(2) translateX(120px)`;
    sendIcon.addEventListener("webkitTransitionEnd", showSentText);
  }, 2000);

function showSentText() {
  const buttonText = document.querySelector('.button-text');
  const iconCheck = document.querySelector('.icon-check'); = `1`;
  buttonText.classList.add('notransition'); = `translateY(-80px)`;
  buttonText.textContent = 'Sent';
  buttonText.classList.remove('notransition'); = `translateY(0px)`; = `translateY(0px)`;
  sendButton.removeEventListener('click', handleClick);