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 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.


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.


                <input id="finder" type="text" placeholder="search term">

<ul id="list"></ul>


                input {
  box-sizing: border-box;
  font-size: 2rem;
  padding: 1rem;
  display: block;
  margin: 2rem auto;

ul {
  list-style: none;
  text-align: center;
  margin: 0;
  padding: 0;

li {
  color: #666;
  strong { color: #000; }
  + .label { margin-top: 1rem; }
  &.label {
    color: #CCC;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.0125em;
    margin-bottom: 0.25rem;


// usage

var finder = document.querySelector("#finder"),
    list   = document.querySelector("#list"),
    lib    = library();

finder.addEventListener("keyup", onKeydown);

// basic usage
function onKeydown(e) {
  if(! { list.innerHTML = ''; return; }
  var results =, lib);
  if(results.success) { 
  } else {

// handling search results
function outputSearchResults(results) {
  // clear list
  list.innerHTML = '';

  // you deleted the last letter, do nothing more
  if(results.count === lib.length) return;
  // label exact
  if(results.exact.length) label(list, 'Exact Matches');
  // spit out exacts
  // no need to go further unless fuzzy
  if(!results.fuzzy.length) return;

  // label fuzzy
  if(results.fuzzy.length) label(list, 'Fuzzy Matches');
  // spit out fuzzies

// outputting matches
function outputMatches(matchesArray) {
  matchesArray.forEach((match) => {
    var el = document.createElement('li');
    match._substrings.forEach((str) => {
      if(str.match) {
        el.innerHTML += `<strong>${str.str}</strong>`;
      } else {
        el.innerHTML += str.str;

// labeling output
function label(list, text) {
  var line = document.createElement('li');
  line.innerHTML = text;
  line.className = 'label';

// we would probably sort these names by last touched so that "recent" has value
// it will still prefer an exact match over a fuzzy, 
// but each would be sorted by this order
function library() {
  return [