Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div class="w-full h-screen flex pl-5 lg:pl-0 lg:justify-center pt-5 bg-gray-200">
    <div
        x-data="{
            open: false,
            search: '',
            input: 'πŸ™‚',
            emojis: {
                'tractor, farm, machine, agriculture': '🚜',
                'leaf, plant, nature, green, agricultre, ecology': '🌿',
                'corn, field, agricuultre, vegetable, plant, nature, green, ecology': '🌽',
                'fish, sea, ocan, swimming, water': '🐟',
                'home, house, building, apartment, residence': '🏠',
                'university, official, building, columns, institution': '🏦',
                'school, education, student, learn, diploma': '🏫',
                'education, school, student, learn, diploma': 'πŸŽ“',
                'child, children, young': 'πŸ§’',
                'book, paper, knowledge, reading, library, books, literature': 'πŸ“–',
                'scroll, paper, document, page, book': 'πŸ“œ',
                'contract, bookmark, tab, sheet, signature': 'πŸ“‘',
                'pencil, write, edit, paper, memo, note': '✏️',
                'pen, write, paper, memo, note, fountain pen': 'βœ’οΈ',
                'military, army, soldier, war, helmet': 'πŸͺ–',
                'tool, measure, scale, ruler, law, regulation, enforcement': 'βš–οΈ',
                'police, cop, urgence, security, law, enforcement, arrest, criminal, law enforcement': 'πŸš“',
                'shield, protection, security, safety, defense': 'πŸ›‘οΈ',
                'urgence, police, fire, light, warning, danger': '🚨',
                'bomb, explode, explosion, bang, blast, grenade': 'πŸ’£',
                'fire, flame, hot, heat, blaze, brigade': 'πŸ”₯',
                'thermometer, hot, temperature, warm, ill, illness, fever': '🌑️',
                'money, bag, dollar, coin': 'πŸ’°',
                'money, purse, wallet, bag, dollar, euro': 'πŸ‘›',
                'credit, bank, money, loan, bill, payment, credit card': 'πŸ’Ά',
                'chart, graph, analytics, statistics, data, report': 'πŸ“Š',
                'money, dollar, currency, payment, bank, banknote, exchange, cash': 'πŸ’±',
                'money, dollar, currency, payment, bank, banknote, exchange, cash': 'πŸ’΅',
                'money, dollar, currency, payment, bank, banknote, exchange, cash, fly': 'πŸ’Έ',
                'shopping, buy, purchase, cart, buy': 'πŸ›’',
                'shopping, buy, purchase, shopping cart': 'πŸ›οΈ',
                'travel, luggage, bag, suitcase, bag': '🧳',
                'film, movie, motion, cinema, theater, culture': '🎬',
                'computer, laptop, digital, keyboard, monitor, screen': 'πŸ’»',
                'lightning, bolt, electricity, science': '⚑',
                'light, bulb, electric, electricity': 'πŸ’‘',
                'flashlight, light, lamp': 'πŸ”¦',
                'rocket, launch, space, ship, plane, space, start up': 'πŸš€',
                'hospital, medical, center, care, health, sickness, disease, illness': 'πŸ₯',
                'clothing, lab, coat, science, laboratory': 'πŸ₯Ό',
                'factory, building, manufacturing, production, construction, polution': '🏭',
                'globe, world, earth, planet, map, travel, space': '🌍',
                'location, map, pin, marker, navigation, aid': 'πŸ“',
                'europe, european union, flag, country, nation, place, location, geography, globe': 'πŸ‡ͺπŸ‡Ί',
                'custom, border, control, security, safety, protection': 'πŸ›‚',
                'bus, car, transportation, transportation vehicle, trolly': '🚎',
                'alarm, clock, morning, ring, wake up': '⏰',
                'clock, time, timer, watch, stopwatch': '⏱',
                'truck, transportation, delivery, road, vehicule': '🚚',
                'truck, transportation, delivery, road, vehicule': 'πŸš›',
                'key, lock, password, secure': 'πŸ”‘',
                'trophy, award, cup, competition, game, sport, winner': 'πŸ†',
                'win, medal, gold, silver, bronze, rank, trophy, sport, competition, game, award': 'πŸ…',
                'flex, muscle, body, workout, exercise': 'πŸ’ͺ',
                'congratulations, party, popper, confetti, celebration': 'πŸŽ‰',
                'ticket, prize, gift, award, prize, gift, admission': '🎟',
                'star, gold, yellow, sky, space, night, evening, dusk': '⭐️',
                'star, astronomy, sparkle, sparkles, magic': '✨',
                'heart, like, favorite, love': '❀️',
                'handshake, agreement, hands': 'πŸ€β€',
                'eye, vision, look, see': 'πŸ‘€',
                'megaphone, announcement, broadcast, public, speaking': 'πŸ“£',
                'dice, game, chance, roll, random, target, center': '🎯',
                'gift, present, package, box, celebrate, birthday, party': '🎁',
                'balloon, celebration,party, birthday,': '🎈',
                'hourglass, time, timer, watch, stopwatch': '⏳',
                'clap, applause, bravo, hand, gesture, wave, hand clapping': 'πŸ‘',
                'clown, face, funny, lol, party, hat': 'πŸ₯³',
                'face, happy, joy, heart, love, emotion, smiley': 'πŸ₯°',
                'sunglasses, cool, smile, smiley': '😎',
                'laughing, lol, smile, smiley': 'πŸ˜‚',
                'open hands, smiley, hug, love, care': 'πŸ€—',
                'smiley, face, happy, joy, emotion, smiley': 'πŸ™‚',
            },
            toggle() {
                if (this.open) {
                    return this.close()
                }

                this.$refs.button.focus()

                this.open = true
            },
            close(focusAfter) {
                if (! this.open) return

                this.open = false

                focusAfter && focusAfter.focus()
            },
            get filteredEmojis() {
                return Object.keys(this.emojis)
                .filter(key => key.includes(this.search))
                .reduce((obj, key) => {
                  obj[key] = this.emojis[key];
                  return obj;
                }, {})
            }
        }"
        x-on:keydown.escape.prevent.stop="close($refs.button)"
        x-on:focusin.window="! $refs.panel.contains($event.target) && close()"
        x-id="['dropdown-button']"
        class="relative"
    >
        <!-- Button -->
        <button
            x-ref="button"
            x-on:click="toggle()"
            :aria-expanded="open"
            :aria-controls="$id('dropdown-button')"
            type="button"
            class="bg-white px-5 py-2.5 rounded-md shadow"
        >
            <span x-text="input"></span>
        </button>

        <input type="hidden" id="emoji" x-model="input" value="">

        <!-- Panel -->
        <div
            x-ref="panel"
            x-show="open"
            x-transition.origin.top.left
            x-on:click.outside="close($refs.button)"
            :id="$id('dropdown-button')"
            style="display: none; width: 24.85rem;"
            class="absolute left-0 mt-2 p-4 max-h-64 bg-white shadow-md overflow-scroll rounded"
        >
            <input type="search" x-model="search" class="h-10 w-full px-2 mb-2 text-sm border border-1 border-slate-200 bg-gray-50 rounded-md placeholder:text-gray-500" placeholder="Search an emoji...">
            <template x-for="(emoji, keywords) in filteredEmojis" :key="emoji">
                <button class="inline-block py-2 px-3 m-1 cursor-pointer rounded-md bg-gray-100 hover:bg-blue-100" :title="keywords" x-on:click="input = emoji; toggle();">
                    <span class="inline-block w-5 h-5" x-text="emoji"></span>
                </button>
            </template>
        </div>
    </div>
</div>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console