I built a CSS framework where every class name is an emoji…
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogI built a CSS framework where every class name is an emoji
    Back to Blog
    I built a CSS framework where every class name is an emoji
    css

    I built a CSS framework where every class name is an emoji

    Tom Hayes February 23, 2026
    0 views

    BEMoji is a fully featured BEM framework that uses emoji as class names. It's stupid. It works. It's on npm.


    title: I built a CSS framework where every class name is an emoji published: true description: BEMoji is a fully featured BEM framework that uses emoji as class names. It's stupid. It works. It's on npm. tags: css, jokes, Tailwind, BEM cover_image: https://tomhayes.github.io/BEMoji/og-image.png

    I got into one too many Tailwind vs BEM arguments this month and decided the correct response was to build something that makes both sides equally uncomfortable.

    Meet BEMoji: a production-grade CSS framework where every class name is an emoji.

    <article class="🃏">
      <div class="🃏__🖼️ 🃏__🖼️--🌟">
        <img src="hero.jpg" alt="...">
      </div>
      <div class="🃏__📝">
        <h2 class="🃏__🔠">Card Title</h2>
      </div>
      <footer class="🃏__🦶">
        <button class="🔘 🔘--🌟">Primary</button>
        <button class="🔘 🔘--👻">Disabled</button>
      </footer>
    </article>
    

    That is valid, production HTML. It works in every modern browser. I am not sorry.

    Why does this exist

    The core BEM pattern is block__element--modifier. BEMoji keeps that structure exactly, just swapping string names for emoji tokens. The double-underscore and double-hyphen delimiters are preserved, so the class names are still machine-parseable even if they're completely illegible to humans.

    It started as a joke and then I accidentally made it real.

    It's actually kind of a full framework

    This is the part that got out of hand. BEMoji ships with:

    • 143 canonical emoji tokens across blocks, elements, modifiers and utilities
    • A complete design token system (yes, using emoji as CSS custom property names: --📏-4, --🌑-md, --⭕-full)
    • 24 pre-built components (cards, buttons, badges, alerts, modals, tables, the lot)
    • A PostCSS plugin so you can write readable BEM in your source and get emoji compiled at build time
    • A Vite plugin with HMR support
    • An ESLint plugin that enforces correct token usage
    • A React bem() helper
    • A CLI with init, compile, audit, decode, encode and export commands

    The CLI's decode command is probably my favourite part:

    npx bemoji decode "🃏__🖼️--🌟"
    # card__image--featured
    

    The PostCSS workflow

    You don't have to write emoji by hand in your source files. The PostCSS plugin lets you use a bracket shorthand:

    .[card] {
      border-radius: var(--⭕-md);
      box-shadow: var(--🌑-sm);
    }
    
    .[card__image--featured] {
      outline: 2px solid var(--🟡);
    }
    

    Which compiles to:

    .🃏 {
      border-radius: var(--⭕-md);
      box-shadow: var(--🌑-sm);
    }
    
    .🃏__🖼️--🌟 {
      outline: 2px solid var(--🟡);
    }
    

    So the output is emoji soup but your source stays readable. Or as readable as it was before, anyway.

    The React helper

    import { useBem } from 'bemoji/react';
    
    function Card({ featured }) {
      const b = useBem('card');
    
      return (
        <article className={b()}>
          <div className={b('image', { featured })}>
            ...
          </div>
        </article>
      );
    }
    
    // When featured=true, className becomes "🃏__🖼️ 🃏__🖼️--🌟"
    

    There are legitimate arguments for this

    I feel compelled to make the honest case, because it genuinely surprised me:

    Free obfuscation. Your production CSS is meaningless to anyone without the config file. You get the obfuscation benefits of CSS Modules without the build complexity.

    Enforced vocabulary. Every UI concept maps to one canonical emoji. The config file is your design system contract. Changing a concept's emoji is a one-line config change that propagates everywhere.

    It's faster to type than you think. Once you have emoji picker shortcuts set up, 🃏 is two keystrokes. .card__image--featured is 24. The maths eventually works out.

    None of this makes it a good idea. But they are real arguments.

    The config

    // bemoji.config.js
    export default {
      blocks: {
        card:    '🃏',
        navbar:  '🧭',
        modal:   '🪟',
        alert:   '🔔',
      },
      elements: {
        image:  '🖼️',
        title:  '🔠',
        body:   '📝',
        button: '🔘',
      },
      modifiers: {
        primary:  '🌟',
        danger:   '🔴',
        disabled: '👻',
        loading:  '⏳',
      },
    };
    

    Install

    npm install bemoji
    npx bemoji init
    

    The init command scaffolds a config, imports the base CSS, and wires up PostCSS.

    Links

    • Docs + demo: https://tomhayes.github.io/BEMoji/
    • GitHub: https://github.com/tomhayes/BEMoji
    • npm: https://npmjs.com/package/bemoji

    My personal favourite token is 🦶 for footer. If you find a better use for it than I have, open a PR.

    Tags

    cssjokestailwindcssbem

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • Automate Blog Content Creation with Notion MCP, DeepSeek AI, and WordPressn8n · $9.99 · Related topic
    • Generate AI Videos from Scripts with DeepSeek, Synthesia, and Together.ain8n · $24.99 · Related topic
    • Compare Multi-Period Financial Data from Google Sheets with DeepSeek AI Analysisn8n · $14.99 · Related topic
    • PostgreSQL Conversational Agent with Claude & DeepSeek (Multi-KPI, Secure)n8n · $14.99 · Related topic
    Browse all workflows