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

              
                <main>
  <h1>noun.js</h1>
  <p class="intro">Because too often around the office we say, &ldquo;that would be a great name for a Javascript library.&rdquo;</p>
  <form action="#" id="search">
    <div>
      <label for="name"></label>
      <input type="text" name="name" id="name" placeholder="carrots" autocomplete="off" />
    </div>

    <div>
      <input type="submit" value="So, is it a Javascript library?" />
    </div>
  </form>

  <section class="results">

    <output id="result_count" name="result_count" form="search"></output>
    <output id="result_top" name="result_top" form="search">

    </output>
    <a id="create" style="display: none;" href="https://github.com/new">Well, time to make one!</a>

  </section>

  <footer>
    <a href="https://codepen.io/bmuenzenmeyer" class="icon codepen" title="CodePen">
      <svg viewBox="0 0 512 512">
        <path d="M427 201.9c-0.6-4.2-2.9-8-6.4-10.3L264.2 87.3c-4.9-3.3-11.4-3.3-16.3 0L91.4 191.6c-4 2.7-6.5 7.4-6.5 12.2v104.3c0 4.8 2.5 9.6 6.5 12.2l156.4 104.3c4.9 3.3 11.4 3.3 16.3 0L420.6 320.4c4-2.6 6.6-7.4 6.6-12.2V203.9C427.1 203.2 427.1 202.6 427 201.9 427 201.7 427.1 202.6 427 201.9zM270.7 127.1l115.2 76.8 -51.5 34.4 -63.8-42.7V127.1zM241.3 127.1v68.6l-63.8 42.7 -51.5-34.4L241.3 127.1zM114.3 231.4l36.8 24.6 -36.8 24.6V231.4zM241.3 384.9L126.1 308.1l51.5-34.4 63.8 42.6V384.9zM256 290.8l-52-34.8 52-34.8 52 34.8L256 290.8zM270.7 384.9V316.3l63.8-42.6 51.5 34.4L270.7 384.9zM397.7 280.6l-36.8-24.6 36.8-24.6V280.6z"></path>
      </svg>
      <!--[if lt IE 9]><em>CodePen</em><![endif]--></a>
    <a href="https://twitter.com/bmuenzenmeyer" class="icon twitter" title="Twitter">
    <svg viewBox="0 0 512 512">
      <path d="M419.6 168.6c-11.7 5.2-24.2 8.7-37.4 10.2 13.4-8.1 23.8-20.8 28.6-36 -12.6 7.5-26.5 12.9-41.3 15.8 -11.9-12.6-28.8-20.6-47.5-20.6 -42 0-72.9 39.2-63.4 79.9 -54.1-2.7-102.1-28.6-134.2-68 -17 29.2-8.8 67.5 20.1 86.9 -10.7-0.3-20.7-3.3-29.5-8.1 -0.7 30.2 20.9 58.4 52.2 64.6 -9.2 2.5-19.2 3.1-29.4 1.1 8.3 25.9 32.3 44.7 60.8 45.2 -27.4 21.4-61.8 31-96.4 27 28.8 18.5 63 29.2 99.8 29.2 120.8 0 189.1-102.1 185-193.6C399.9 193.1 410.9 181.7 419.6 168.6z"></path>
    </svg>
    <!--[if lt IE 9]><em>Twitter</em><![endif]--></a>
  <a href="https://github.com/bmuenzenmeyer" class="icon github" title="GitHub">
    <svg viewBox="0 0 512 512">
      <path d="M256 70.7c-102.6 0-185.9 83.2-185.9 185.9 0 82.1 53.3 151.8 127.1 176.4 9.3 1.7 12.3-4 12.3-8.9V389.4c-51.7 11.3-62.5-21.9-62.5-21.9 -8.4-21.5-20.6-27.2-20.6-27.2 -16.9-11.5 1.3-11.3 1.3-11.3 18.7 1.3 28.5 19.2 28.5 19.2 16.6 28.4 43.5 20.2 54.1 15.4 1.7-12 6.5-20.2 11.8-24.9 -41.3-4.7-84.7-20.6-84.7-91.9 0-20.3 7.3-36.9 19.2-49.9 -1.9-4.7-8.3-23.6 1.8-49.2 0 0 15.6-5 51.1 19.1 14.8-4.1 30.7-6.2 46.5-6.3 15.8 0.1 31.7 2.1 46.6 6.3 35.5-24 51.1-19.1 51.1-19.1 10.1 25.6 3.8 44.5 1.8 49.2 11.9 13 19.1 29.6 19.1 49.9 0 71.4-43.5 87.1-84.9 91.7 6.7 5.8 12.8 17.1 12.8 34.4 0 24.9 0 44.9 0 51 0 4.9 3 10.7 12.4 8.9 73.8-24.6 127-94.3 127-176.4C441.9 153.9 358.6 70.7 256 70.7z"></path>
    </svg>
    <!--[if lt IE 9]><em>GitHub</em><![endif]--></a>


</footer>
</main>
              
            
!

CSS

              
                *{
  box-sizing: border-box;
}

body{
  font: 24px/1.5 Catamaran, Arial, sans-serif;
  text-align: center;
  color: rebeccapurple;
  background: linear-gradient(to bottom, #FFFFFF , rebeccapurple);
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100%;
  margin: 0;
}

h1{
  display: inline-block;
  margin-bottom: 1em;
  min-height: 1em;
}

form, 
.intro,
footer{
  width: 90%;
  margin: 0 auto 3em;
}

input{
  display: block;
  width: 100%;
  padding:  1em .25em;
  margin: 1em auto;
  text-align: center;
  font-size: 1.5rem;
}

input[type=submit]{
  border: none;
  background: #8B6DE8;
  color: white;
  border-bottom: 3px solid #4E3D82;
  border-radius: 3px;
  &:hover{
    background: darken(#8B6DE8, 5%);
  }
  &:active{
    border-bottom: 3px solid #8B6DE8;
    position: relative;
    top: 1px;
  }
}

.emphasis{
  color: #fafafa;
}

.repo{
  border: 1px solid #fafafa;
  background: white;
  width: 90%;
  margin: 0 auto 1em;
  border-radius: 3px;
  padding: .5em;
  @media only screen and (min-width: 45em){
    width: 45%;
  }
  header,
  section,
  a{
    display: block;
    text-align: left;
    color: #4E3D82;
    text-decoration: none;
  }
  header{
    font-weight: bold;
  }
  p{
    margin-bottom: 0;
  }
  .stat{
    font-size: .75em;
    color: grey;
    float: right;
    font-weight: normal;
    margin-left: .25em;
  }
  strong{
    color: #333;
  }
  &:hover{
    background-color: #eee;
  }
}

#create{
  color: #fafafa;
}

footer{
  border-top: 1px solid white;
  font-size: 1rem;
}

footer,
footer a,
footer svg{
  color: #fafafa;
  fill: #fafafa;
}

.icon{
  display: inline-block;
  position: relative;
  height: 24px;
  height: 2rem;
  width: 24px;
  width: 2rem;
}

.typed-cursor{
  display: inline;
  font-size: 2em;
  opacity: 1;
  animation: blink 0.7s infinite;
}
@keyframes blink{
    0% { opacity:1; }
    50% { opacity:0; }
    100% { opacity:1; }
}
@-webkit-keyframes blink{
    0% { opacity:1; }
    50% { opacity:0; }
    100% { opacity:1; }
}
@-moz-keyframes blink{
    0% { opacity:1; }
    50% { opacity:0; }
    100% { opacity:1; }
}
              
            
!

JS

              
                $(function() {
  
    $('#search').on('submit', function(e){
      e.preventDefault();
      var noun = encodeURIComponent($('#name').val());
      if(noun){
        $.get('https://api.github.com/search/repositories?q=' + noun + '+language:javascript+in:name&sort=stars&order=desc', 
        function(d) {
          if(d.total_count === 0){
            $('#result_count').html('<span>0</span> results with ' + decodeURIComponent(noun) + ' in the name.');
            $('#result_top').hide().html('');
            $('#create').show();
          } else{
            $('#result_count').html('<span class="emphasis>' + d.total_count + '</span> results with ' + decodeURIComponent(noun) + ' in the name.');
            $('#create').hide();
            
            var HTML = '',
                limit = d.total_count > 5 ? 5 : d.total_count;
            for(var i = 0; i < limit; i++){
              var repoName = d.items[i].name,
                  repoUrl = d.items[i].html_url,
                  repoDesc = d.items[i].description,
                  repoStars = d.items[i].stargazers_count,
                  repoForks = d.items[i].forks_count,
                  repoHTML = '<article class="repo"><a href="' + repoUrl + '" target="_blank"><header> ' + repoName + '<span class="stat"><strong>' + repoForks + '</strong> forks</span> <span class="stat"><strong>' + repoStars + '</strong> stars</span></header>' + '<p>' + repoDesc + '</p></a></article>';
              HTML += repoHTML;
            }
            
            $('#result_top').show().html(HTML);
          }
        });
      }
    });
  
  $('h1').typed({
    strings: ["carrots ^3000",
              "blanket ^3000",
              "grunt ^3000",
              "cabbage ^3000",
              "net ^3000",
              "chicago ^3000",
              "ferry ^3000",
              "metal ^3000",
              "grain ^3000",
              "linen ^3000",
              "voice ^3000",
              "distance ^3000",
              "ice ^3000",
              "daughter ^3000",
              "color ^3000",
              "dingbat ^3000",
              "tendency ^3000",
              "instrument ^3000",
              "question ^3000",
              "meat ^3000",
              "bootleg ^3000",
              "hulk ^3000",
              "croissant ^3000",
              "sunset ^3000",
              "smile ^3000",
              "zinger ^3000",
              "coffin ^3000",
              "ink ^3000",
              "flame ^3000",
              "blacksmith ^3000",
              "motion ^3000",
              "nerd ^3000",
              "tolerance ^3000",
              "backbone ^3000",
              "printmaker ^3000",
              "toolbox ^3000",
              "silkscreen ^3000",
              "taste ^3000",
              "sunglasses ^3000",
              "mosquito ^3000",
              "scissors ^3000",
              "airplane ^3000",
              "telephone ^3000",
              "elephant ^3000",
              "warlord ^3000",
              "corvette ^3000",
              "paperback ^3000",
              "spiderweb ^3000",
              "hopscotch ^3000",
              "tablesaw ^3000"
             ],
    startDelay: 2000,
    typeSpeed: 100,
    backSpeed: 10,
    backDelay: 10,
  });  
  
});
              
            
!
999px

Console