dextinity-mail-react

Build responsive cross-client HTML emails with React components and MJML.

52|9|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/vivid-planet/dextinity --skill dextinity-mail-react-vivid-planet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dextinity-mail-react
Source: https://github.com/vivid-planet/dextinity/tree/main/skills/dextinity-mail-react
Command: npx skills add https://github.com/vivid-planet/dextinity --skill dextinity-mail-react-vivid-planet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dextinity/mail-react, and includes references (resource) components.

What problem does it solve? HTML email development is a minefield: Outlook renders with Microsoft Word, Gmail drops selectors, Yahoo rewrites height, and MJML's column widths live in media queries that some clients ignore. This Skill guides you through building emails with @dextinity/mail-react that render correctly across all major email clients. ## Core Features & Use Cases - Themed React Email Components: Build emails with MjmlSection, MjmlText, MjmlButton, and HtmlText components backed by a type-safe theme system with responsive values and module augmentation. - Battle-Tested Layout Patterns: Get proven patterns for multi-column layouts, fixed+fluid columns, mobile stacking, breakpoint content switching, and Outlook VML workarounds. - CMS Block Rendering: Render Dextinity CMS pixel-image and rich-text block data directly in emails with MjmlPixelImageBlock and createRichTextBlock. - Use Case: You need a two-column email section that stacks on mobile and renders correctly in Outlook, Gmail, and Yahoo Mail. The Skill provides the exact column padding, disableResponsiveBehavior, and registerStyles patterns to achieve this. ## Quick Start Ask the AI to build a responsive two-column email section using @dextinity/mail-react that stacks on mobile and works in Outlook.

Frequently Asked Questions about dextinity-mail-react

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create multi-column layouts in MJML emails?

Place MjmlColumn components inside an MjmlSection with disableResponsiveBehavior set, which wraps columns in an MjmlGroup so widths are written inline. Create gaps with padding on inner column edges, and write mobile stacking rules yourself via registerStyles.

How to build HTML emails with React and MJML?

Use @dextinity/mail-react, which wraps MJML in themed React components. Define a theme with createTheme, wrap content in MjmlMailRoot, and compose sections, columns, and text components that compile to cross-client-compatible HTML.

Does border-radius work in Outlook emails?

No, classic Outlook ignores border-radius entirely. MjmlImage and HtmlImage handle rounded images automatically when given pixel dimensions, but buttons and containers need a hand-written VML v:roundrect inside a conditional comment with fixed pixel dimensions.

Why do my email columns stack in GMX and Web.de?

MJML writes column widths in a min-width media query, which clients like GMX and Web.de drop, causing columns to stack. Set disableResponsiveBehavior on every multi-column section so MJML writes widths inline via an MjmlGroup.

How do I render CMS rich-text block data in an email?

Call createRichTextBlock once at module level with blockTypes mapping draft-js block types to theme text variants. It returns MjmlRichTextBlock for MJML layouts and HtmlRichTextBlock for raw HTML contexts, both accepting the CMS block data as a prop.

Why does my email line-height break in Outlook?

Outlook calculates line-height with its own rules, causing unexpected spacing. Every manual line-height on raw HTML inside ending tags must be paired with the inline style mso-line-height-rule: exactly. HtmlText and built-in components handle this automatically.