Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
framix-team avatar

Email Html Mjml

  • 631 installs
  • 61 repo stars
  • Updated February 28, 2026
  • framix-team/skill-email-html-mjml

email-html-mjml is a Claude Code skill that generates responsive, client-safe marketing and lifecycle email HTML using MJML components for developers who want reliable cross-client rendering without hand-rolled table lay

About

email-html-mjml is an email frontend skill from framix-team/skill-email-html-mjml that produces responsive, client-safe HTML for marketing and lifecycle campaigns using MJML markup. Instead of brittle hand-written table layouts, developers define mj-section, mj-column, mj-text, and mj-image components that compile to Outlook- and Gmail-compatible HTML. The skill suits transactional updates, newsletters, and onboarding sequences where broken rendering directly impacts conversion. Developers reach for email-html-mjml when adding drip campaigns, redesigning lifecycle emails, or replacing unmaintainable inline-table templates in a codebase or ESP workflow.

  • MJML section/column layout for headers, hero images, and CTA buttons
  • Patterns for background-image hero blocks with centered slogan and promotion button
  • Styled body copy blocks with typography and color tokens inline-friendly for email clients
  • Company header and repeatable section backgrounds for brand-consistent campaigns
  • Output-oriented toward compilable MJML rather than one-off pasted HTML

Email Html Mjml by the numbers

  • 631 all-time installs (skills.sh)
  • Ranked #551 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/framix-team/skill-email-html-mjml --skill email-html-mjml

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs631
repo stars61
Security audit3 / 3 scanners passed
Last updatedFebruary 28, 2026
Repositoryframix-team/skill-email-html-mjml

How do you build responsive email HTML with MJML?

Generate responsive, client-safe marketing and lifecycle email HTML using MJML components instead of hand-rolled tables.

Who is it for?

Frontend developers shipping marketing or lifecycle emails who need Outlook-safe responsive layouts via MJML.

Skip if: Developers configuring ESP deliverability, DNS authentication, or plain-text-only transactional messages without HTML templates.

When should I use this skill?

A developer asks to create, refactor, or fix responsive email HTML using MJML for marketing or lifecycle campaigns.

What you get

MJML source files, compiled client-safe HTML, and reusable email section components.

  • MJML template files
  • Compiled email HTML

Files

SKILL.mdMarkdownGitHub ↗

email-html-mjml — Responsive Email Developer

Generate valid, cross-client MJML 4.x templates and compile them to production-ready HTML. The primary goal is compatibility: Outlook (2013–365), Gmail (web/app), Apple Mail, and major mobile clients. Every output must be compilable with --config.validationLevel=strict and survive Gmail's 102KB clip limit.

---

Workflow

1. Gather requirements — Infer email type, brand colors, and content from the user's message and conversation context. Ask only for what is genuinely missing and blocking progress (e.g., no colors provided and the layout has branded sections). Never front-load a questionnaire. 2. Plan layout — Decide and announce the structure before writing code (single-column, 2-col grid, hero + content, etc.) 3. Load component references — Read the relevant file(s) from the Component Index below before writing any MJML 4. Generate MJML — Write complete, valid MJML starting from <mjml> with a full <mj-head> 5. Compile — Follow compilation.md. Run npx mjml with --config.minify=true 6. Deliver both files — Always output .mjml source AND compiled .html

---

9 Engineering Rules

1. Structural Integrity — All visual content MUST be in <mj-column> inside <mj-section>. Sections cannot be nested. 2. Responsive Defaults — Assume 600px width. Use <mj-group> to prevent mobile stacking for side-by-side elements (social bars, logo rows). 3. Outlook Compatibility — Use <mj-font> for web fonts (prevents Times New Roman fallback). Always provide a fallback stack (Arial, sans-serif). For <mj-section> background images, always set both background-size and a fallback background-color. 4. Gmail Optimization — Use inline="inline" on <mj-style> for custom CSS. Prefer component attributes (color, font-size) over CSS classes for critical styles. 5. Dark Mode — Include dark mode support when explicitly requested or when the email has a light background that would cause harsh forced-inversion. See the Dark Mode Pattern below. 6. Accessibility — Every <mj-image> MUST have alt. Always set <mj-title> (populates aria-label). Maintain WCAG 2.1 AA 4.5:1 contrast. For heading roles, use mj-html-attributes — direct role/aria-level attributes on mj-text are illegal under strict validation (see Accessibility Checklist below). 7. Styling Efficiency — Use <mj-attributes> with <mj-all>, component defaults, and <mj-class> to eliminate repetitive inline styles. 8. Hero Sections — Use <mj-hero> for full-bleed hero banners; it falls back to a regular section in unsupported clients. Avoid <mj-accordion> and <mj-carousel> — client support is too poor to be useful. 9. Templating Support — Wrap dynamic tags (Handlebars/Liquid) in <mj-raw> to protect them from the MJML parser.

---

Critical Gotchas

Outlook:

  • Background images: VML only generated for <mj-section> and <mj-hero> — nowhere else
  • Background positioning: keyword values only (top, center, bottom) — pixel values ignored
  • Always pair background-repeat="no-repeat" with explicit background-size
  • Font fallback: <mj-font> hides @font-face from Outlook via MSO conditional comments

Gmail:

  • Use component attributes for critical layout — CSS classes may be stripped
  • 102KB clip: always compile with --config.minify=true

iOS / Android stacking:

  • Always compile with --config.minify=true — removes whitespace between inline-block columns
  • Whitespace between tags causes stacking even inside <mj-group>

Vertical-align bug:

  • If any column in a section sets vertical-align, ALL columns in that section must explicitly set it

JavaScript:

  • JS is completely blocked in all email clients (Gmail, Outlook, Apple Mail, iOS Mail). No onclick, no clipboard API, no interactivity of any kind. Interactive-looking elements (copy buttons, toggles) are purely decorative.

---

Dark Mode Pattern

<mj-head>
  <mj-raw>
    <meta name="color-scheme" content="light dark">
    <meta name="supported-color-schemes" content="light dark">
  </mj-raw>

  <!-- Light logo visible by default; dark logo hidden -->
  <mj-style inline="inline">
    .dark-logo { display: none !important; }
  </mj-style>

  <!-- Dark mode overrides -->
  <mj-style>
    @media (prefers-color-scheme: dark) {
      .light-logo { display: none !important; }
      .dark-logo  { display: block !important; }
    }
  </mj-style>
</mj-head>

Safe neutrals: #121212 (not #000000) and #F1F1F1 (not #FFFFFF) — prevents jarring forced inversions.

---

Accessibility Checklist

  • <mj-title> is set (screen reader email label + aria-label)
  • lang attribute on root <mjml> tag
  • alt on every <mj-image> and <mj-social-element>
  • Heading role set via mj-html-attributes (NOT as a direct attribute on mj-text):
  <!-- In mj-head -->
  <mj-html-attributes>
    <mj-selector path=".email-heading div">
      <mj-html-attribute name="role">heading</mj-html-attribute>
      <mj-html-attribute name="aria-level">1</mj-html-attribute>
    </mj-selector>
  </mj-html-attributes>
  <!-- On the component -->
  <mj-text css-class="email-heading" ...>Heading text</mj-text>
  • 4.5:1 contrast ratio on all text/background pairs
  • No text baked into images — always use live <mj-text> blocks

---

Component Index

Before writing any MJML, read the component file(s) for the components you'll use.

GroupComponentsLoad whenFile
Headmj-attributes, mj-font, mj-style, mj-preview, mj-breakpoint, mj-html-attributesSetting up head, global stylescomponents/head.md
Layoutmj-body, mj-section, mj-column, mj-group, mj-wrapperBuilding structure / gridcomponents/layout.md
Contentmj-text, mj-image, mj-button, mj-divider, mj-spacer, mj-tableAdding content blockscomponents/content.md
Interactivemj-accordion, mj-carousel, mj-social, mj-navbarInteractive or social elementscomponents/interactive.md
Advancedmj-hero, mj-raw, mj-includeHero banners, template tags, partialscomponents/advanced.md

General reference (hierarchy, ending tags, validation, width math, Gmail clip): mjml-reference.md

---

Compilation

Read compilation.md for the full workflow. Key command:

npx mjml template.mjml -o dist/template.html --config.minify=true --config.validationLevel=strict

Hard rules:

  • Never npm install -g mjml
  • Always use npx or ./node_modules/.bin/mjml
  • If mjml not in package.json, suggest npm install -D mjml

---

Examples

assets/examples/basic-layout.mjml — MJML docs basic layout example. Covers 6-section structure: company header, image hero + button, intro text, 2-column image+text, 3-column icons, social row. Intentionally bare-bones (no mj-head, no dark mode, placeholder copy) — reflects the MJML docs style. Use as a structural reference for layout patterns only, not as a production template.

---

Output

Always deliver:

1. `<name>.mjml` — complete MJML source (editable, version-controllable) 2. `<name>.html` — compiled output (production-ready, send via ESP)

Name files after the email type: welcome.mjml, promo-sale.mjml, order-confirmation.mjml

Related skills

FAQ

Why use email-html-mjml over raw HTML tables?

email-html-mjml uses MJML components that compile to tested, client-safe HTML, avoiding fragile hand-rolled tables that break in Outlook and mobile clients.

What email types does email-html-mjml support?

email-html-mjml targets responsive marketing and lifecycle emails—headers, hero sections, and body content—authored with MJML mj-section and mj-column patterns.

Is Email Html Mjml safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Frontend Developmentcontentlifecycle

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.