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.


                <svg xmlns="" version="1.1">
  <pattern id="pattern"
           x="0" y="0" width="210" height="210"
           patternUnits="userSpaceOnUse" >
    <text class='emoji-pattern' x="0" y="100" width="80" font-size="80">
    <text class='emoji-pattern' x="100" y="200" width="80" font-size="80">
  <rect fill="url(#pattern)" x="0" y="0" width="100%" height="100%"/>
  <h1>Emoji Background Generator</h1>
  <h2>Cause emojis got yo back!</h2>
  <form class="search-form">
    <input type="text" class="search" placeholder="Filter for Emoji Magic">
    <div class="emoji-container">
      <ul class="suggestions">
  <p>Search and set your favourite emoji as your background pattern!</p>


                $white: #F6F7EB;
$black: #393E41;
$brad: 5px;
@import url(;

body {
  background-color: $black;
  color: $white;
  overflow-x: hidden;
  font-size: 100%;
  font-family: 'Francois One', Helvetica, Arial, sans-serif;

svg {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;

section {
  min-width: 600px;

text {
  opacity: 0.7;

h1, h2, p {
  text-align: center;
  color: $white;
  font-size: 4em;
  line-height: 1;
  margin: 20px 0 0;
  text-shadow: 0px 5px 15px $black;

h2 {
  font-size: 2.5em;
p {
  font-size: 1.5em;

.search-form {
  padding-top: 5vh;
  text-align: center;
  position: relative;

input {
  background-color: $white;
  font-size: 15px;
  padding: 20px;
  width: 40%;
  border: 1px solid $white;
  border-radius: $brad;

.emoji-container {
  height: 40vh;
  overflow-y: scroll;
  background-color: $white;
  width: 50%;
  margin: 0 auto;
  border-radius: $brad;
  margin-top: 5vh;
  padding: 25px;

ul {
  margin: 0;
  padding: 0;
  text-align: left;

li {
  list-style: none;
  padding: 0 15px 5px 0;
  width: 40px;
  display: inline;
  font-size: 35px;

abbr {
  text-decoration: none;
  cursor: pointer;
  font-family: Times;

abbr[title="undefined"] {
  display: none;


                const endpoint = '';
const emojis = [];
const searchInput = document.querySelector('.search');
const suggestions = document.querySelector('.suggestions');
const emojiPattern = Array.from(document.querySelectorAll('.emoji-pattern'));

  .then(blob => blob.json())
  .then(data => emojis.push(
  .then(setTimeout(() => {
  }, 100))
  .catch((err) => {

function findMatches(wordToMatch, emojis) {
  return emojis.filter(emoji =>
    emoji.aliases.some(alias => alias.indexOf(wordToMatch) !== -1)

function renderMatches(arr) {
  const html = => {
    const {
    } = emo;
    return `
      <li class="icon">
        <abbr title="${description}">${emoji}</abbr>
  suggestions.innerHTML = html;

function updateMatches() {
  const matchArray = findMatches(this.value, emojis);

function changeBackground(e) {
  if (!'abbr')) return;
  const emoj =; => pattern.textContent = emoj);

searchInput.addEventListener('change', updateMatches);
searchInput.addEventListener('keyup', updateMatches);
suggestions.addEventListener('click', changeBackground);