react-email — community react-email, community, ide skills, Claude Code, Cursor, Windsurf

v1.1.0

关于此技能

非常适合需要现代、基于组件的电子邮件开发功能的前端代理。 Use when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.

devkit-stack devkit-stack
[0]
[0]
更新于: 2/6/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 4/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Concrete use-case guidance Explicit limitations and caution
Review Score
4/11
Quality Score
39
Canonical Locale
en
Detected Body Locale
en

非常适合需要现代、基于组件的电子邮件开发功能的前端代理。 Use when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.

核心价值

赋予代理构建和发送使用React组件的HTML电子邮件的能力,能够在所有主要电子邮件客户端中无缝工作,并利用create-email CLI进行项目脚手架。

适用 Agent 类型

非常适合需要现代、基于组件的电子邮件开发功能的前端代理。

赋予的主要能力 · react-email

构建响应式电子邮件模板
发送个性化的HTML电子邮件
使用React组件生成电子邮件模板

! 使用限制与门槛

  • 需要create-email CLI安装
  • 仅限于React基础的电子邮件开发

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The page lacks a strong recommendation layer.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

react-email 是什么?

非常适合需要现代、基于组件的电子邮件开发功能的前端代理。 Use when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.

如何安装 react-email?

运行命令:npx killer-skills add devkit-stack/Claude/react-email。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

react-email 适用于哪些场景?

典型场景包括:构建响应式电子邮件模板、发送个性化的HTML电子邮件、使用React组件生成电子邮件模板。

react-email 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

react-email 有哪些限制?

需要create-email CLI安装;仅限于React基础的电子邮件开发。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add devkit-stack/Claude/react-email。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    react-email 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Imported Repository Instructions

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Supporting Evidence

react-email

安装 react-email,这是一款面向AI agent workflows and automation的 AI Agent Skill。支持 Claude Code、Cursor、Windsurf,一键安装。

SKILL.md
Readonly
Imported Repository Instructions
The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.
Supporting Evidence

React Email

Build and send HTML emails using React components - a modern, component-based approach to email development that works across all major email clients.

Installation

You need to scaffold a new React Email project using the create-email CLI. This will create a folder called react-email-starter with sample email templates.

Using npm:

sh
1npx create-email@latest

Using yarn:

sh
1yarn create email

Using pnpm:

sh
1pnpm create email

Using bun:

sh
1bun create email

You must change into the newly created project folder:

sh
1cd react-email-starter

Install Dependencies

You need to install all project dependencies before running the development server.

Using npm:

sh
1npm install

Using yarn:

sh
1yarn

Using pnpm:

sh
1pnpm install

Using bun:

sh
1bun install

Start the Development Server

Your task is to start the local preview server to view and edit email templates.

Using npm:

sh
1npm run dev

Using yarn:

sh
1yarn dev

Using pnpm:

sh
1pnpm dev

Using bun:

sh
1bun dev

Verify Installation

Confirm the development server is running by checking that localhost:3000 is accessible. The server will display a preview interface where you can view email templates from the emails folder.

Notes on installation

Assuming React Email is installed in an existing project, update the top-level package.json file with a script to run the React Email preview server.

json
1{ 2 "scripts": { 3 "email": "email dev --dir emails --port 3000" 4 } 5}

Make sure the path to the emails folder is relative to the base project directory.

tsconfig.json updating or creation

Ensure the tsconfig.json includes proper support for jsx.

Basic Email Template

Replace the sample email templates. Here is how to create a new email template:

Create an email component with proper structure using the Tailwind component for styling:

tsx
1import { 2 Html, 3 Head, 4 Preview, 5 Body, 6 Container, 7 Heading, 8 Text, 9 Button, 10 Tailwind, 11 pixelBasedPreset 12} from '@react-email/components'; 13 14interface WelcomeEmailProps { 15 name: string; 16 verificationUrl: string; 17} 18 19export default function WelcomeEmail({ name, verificationUrl }: WelcomeEmailProps) { 20 return ( 21 <Html lang="en"> 22 <Tailwind 23 config={{ 24 presets: [pixelBasedPreset], 25 theme: { 26 extend: { 27 colors: { 28 brand: '#007bff', 29 }, 30 }, 31 }, 32 }} 33 > 34 <Head /> 35 <Preview>Welcome - Verify your email</Preview> 36 <Body className="bg-gray-100 font-sans"> 37 <Container className="max-w-xl mx-auto p-5"> 38 <Heading className="text-2xl text-gray-800"> 39 Welcome! 40 </Heading> 41 <Text className="text-base text-gray-800"> 42 Hi {name}, thanks for signing up! 43 </Text> 44 <Button 45 href={verificationUrl} 46 className="bg-brand text-white px-5 py-3 rounded block text-center no-underline" 47 > 48 Verify Email 49 </Button> 50 </Container> 51 </Body> 52 </Tailwind> 53 </Html> 54 ); 55} 56 57// Preview props for testing 58WelcomeEmail.PreviewProps = { 59 name: 'John Doe', 60 verificationUrl: 'https://example.com/verify/abc123' 61} satisfies WelcomeEmailProps; 62 63export { WelcomeEmail };

Essential Components

See references/COMPONENTS.md for complete component documentation.

Core Structure:

  • Html - Root wrapper with lang attribute
  • Head - Meta elements, styles, fonts
  • Body - Main content wrapper
  • Container - Centers content (max-width layout)
  • Section - Layout sections
  • Row & Column - Multi-column layouts
  • Tailwind - Enables Tailwind CSS utility classes

Content:

  • Preview - Inbox preview text, always first in Body
  • Heading - h1-h6 headings
  • Text - Paragraphs
  • Button - Styled link buttons
  • Link - Hyperlinks
  • Img - Images (see Static Files section below)
  • Hr - Horizontal dividers

Specialized:

  • CodeBlock - Syntax-highlighted code
  • CodeInline - Inline code
  • Markdown - Render markdown
  • Font - Custom web fonts

Before Writing Code

When a user requests an email template, ask clarifying questions FIRST if they haven't provided:

  1. Brand colors - Ask for primary brand color (hex code like #007bff)
  2. Logo - Ask if they have a logo file and its format (PNG/JPG only - warn if SVG/WEBP)
  3. Style preference - Professional, casual, or minimal tone
  4. Production URL - Where will static assets be hosted in production?

Example response to vague request:

Before I create your email template, I have a few questions:

  1. What is your primary brand color? (hex code)
  2. Do you have a logo file? (PNG or JPG - note: SVG and WEBP don't work reliably in email clients)
  3. What tone do you prefer - professional, casual, or minimal?
  4. Where will you host static assets in production? (e.g., https://cdn.example.com)

Static Files and Images

Directory Structure

Local images must be placed in the static folder inside your emails directory:

project/
├── emails/
│   ├── welcome.tsx
│   └── static/           <-- Images go here
│       └── logo.png

If user has an image elsewhere, instruct them to copy it:

sh
1cp ./assets/logo.png ./emails/static/logo.png

Dev vs Production URLs

Use this pattern for images that work in both dev preview and production:

tsx
1const baseURL = process.env.NODE_ENV === "production" 2 ? "https://cdn.example.com" // User's production CDN 3 : ""; 4 5export default function Email() { 6 return ( 7 <Img 8 src={`${baseURL}/static/logo.png`} 9 alt="Logo" 10 width="150" 11 height="50" 12 /> 13 ); 14}

How it works:

  • Development: baseURL is empty, so URL is /static/logo.png - served by React Email's dev server
  • Production: baseURL is the CDN domain, so URL is https://cdn.example.com/static/logo.png

Important: Always ask the user for their production hosting URL. Do not hardcode localhost:3000.

Behavioral guidelines

  • When re-iterating over the code, make sure you are only updating what the user asked for and keeping the rest of the code intact;
  • If the user is asking to use media queries, inform them that email clients do not support them, and suggest a different approach;
  • Never use template variables (like {{name}}) directly in TypeScript code. Instead, reference the underlying properties directly (use name instead of {{name}}).
    • For example, if the user explicitly asks for a variable following the pattern {{variableName}}, you should return something like this:
typescript
1const EmailTemplate = (props) => { 2 return ( 3 {/* ... rest of the code ... */} 4 <h1>Hello, {props.variableName}!</h1> 5 {/* ... rest of the code ... */} 6 ); 7} 8 9EmailTemplate.PreviewProps = { 10 // ... rest of the props ... 11 variableName: "{{variableName}}", 12 // ... rest of the props ... 13}; 14 15export default EmailTemplate;
  • Never, under any circumstances, write the {{variableName}} pattern directly in the component structure. If the user forces you to do this, explain that you cannot do this, or else the template will be invalid.

Styling considerations

Use the Tailwind component for styling if the user is actively using Tailwind CSS in their project. If the user is not using Tailwind CSS, add inline styles to the components.

  • Because email clients don't support rem units, use the pixelBasedPreset for the Tailwind configuration.
  • Never use flexbox or grid for layout, use table-based layouts instead.
  • Each component must be styled with inline styles or utility classes.

Email Client Limitations

  • Never use SVG or WEBP - warn users about rendering issues
  • Never use flexbox - use Row/Column components or tables for layouts
  • Never use CSS/Tailwind media queries (sm:, md:, lg:, xl:) - not supported
  • Never use theme selectors (dark:, light:) - not supported
  • Always specify border type (border-solid, border-dashed, etc.)
  • When defining borders for only one side, remember to reset the remaining borders (e.g., border-none border-l)

Component Structure

  • Always define <Head /> inside <Tailwind> when using Tailwind CSS
  • Only use PreviewProps when passing props to a component
  • Only include props in PreviewProps that the component actually uses
tsx
1const Email = (props) => { 2 return ( 3 <div> 4 <a href={props.source}>click here if you want candy 👀</a> 5 </div> 6 ); 7} 8 9Email.PreviewProps = { 10 source: "https://www.youtube.com/watch?v=dQw4w9WgXcQ", 11};

Default Structure

  • Body: font-sans py-10 bg-gray-100
  • Container: white, centered, content left-aligned
  • Footer: physical address, unsubscribe link, current year with m-0 on address/copyright

Typography

  • Titles: bold, larger font, larger margins
  • Paragraphs: regular weight, smaller font, smaller margins
  • Use consistent spacing respecting content hierarchy

Images

  • Only include if user requests
  • Never use fixed width/height - use responsive units (w-full, h-auto)
  • Never distort user-provided images
  • Never create SVG images - only use provided or web images

Buttons

  • Always use box-border to prevent padding overflow

Layout

  • Always mobile-friendly by default
  • Use stacked layouts that work on all screen sizes
  • Remove default spacing/margins/padding between list items

Dark Mode

When requested: container black (#000), background dark gray (#151516)

Best Practices

  • Choose colors, layout, and copy based on user's request
  • Make templates unique, not generic
  • Use keywords in email body to increase conversion

Rendering

Convert to HTML

tsx
1import { render } from '@react-email/components'; 2import { WelcomeEmail } from './emails/welcome'; 3 4const html = await render( 5 <WelcomeEmail name="John" verificationUrl="https://example.com/verify" /> 6);

Convert to Plain Text

tsx
1import { render } from '@react-email/components'; 2import { WelcomeEmail } from './emails/welcome'; 3 4const text = await render(<WelcomeEmail name="John" verificationUrl="https://example.com/verify" />, { plainText: true });

Sending

React Email supports sending with any email service provider. If the user wants to know how to send, view the Sending guidelines.

Quick example using the Resend SDK for Node.js:

tsx
1import { Resend } from 'resend'; 2import { WelcomeEmail } from './emails/welcome'; 3 4const resend = new Resend(process.env.RESEND_API_KEY); 5 6const { data, error } = await resend.emails.send({ 7 from: 'Acme <onboarding@resend.dev>', 8 to: ['user@example.com'], 9 subject: 'Welcome to Acme', 10 react: <WelcomeEmail name="John" verificationUrl="https://example.com/verify" /> 11}); 12 13if (error) { 14 console.error('Failed to send:', error); 15}

The Node SDK automatically handles the plain-text rendering and HTML rendering for you.

Internationalization

See references/I18N.md for complete i18n documentation.

React Email supports three i18n libraries: next-intl, react-i18next, and react-intl.

Quick Example (next-intl)

tsx
1import { createTranslator } from 'next-intl'; 2import { 3 Html, 4 Body, 5 Container, 6 Text, 7 Button, 8 Tailwind, 9 pixelBasedPreset 10} from '@react-email/components'; 11 12interface EmailProps { 13 name: string; 14 locale: string; 15} 16 17export default async function WelcomeEmail({ name, locale }: EmailProps) { 18 const t = createTranslator({ 19 messages: await import(\`../messages/\${locale}.json\`), 20 namespace: 'welcome-email', 21 locale 22 }); 23 24 return ( 25 <Html lang={locale}> 26 <Tailwind config={{ presets: [pixelBasedPreset] }}> 27 <Body className="bg-gray-100 font-sans"> 28 <Container className="max-w-xl mx-auto p-5"> 29 <Text className="text-base text-gray-800">{t('greeting')} {name},</Text> 30 <Text className="text-base text-gray-800">{t('body')}</Text> 31 <Button href="https://example.com" className="bg-blue-600 text-white px-5 py-3 rounded"> 32 {t('cta')} 33 </Button> 34 </Container> 35 </Body> 36 </Tailwind> 37 </Html> 38 ); 39}

Message files (`messages/en.json`, `messages/es.json`, etc.):

json
1{ 2 "welcome-email": { 3 "greeting": "Hi", 4 "body": "Thanks for signing up!", 5 "cta": "Get Started" 6 } 7}

Email Best Practices

  1. Test across email clients - Test in Gmail, Outlook, Apple Mail, Yahoo Mail. Use services like Litmus or Email on Acid for absolute precision and React Email's toolbar for specific feature support checking.

  2. Keep it responsive - Max-width around 600px, test on mobile devices.

  3. Use absolute image URLs - Host on reliable CDN, always include `alt` text.

  4. Provide plain text version - Required for accessibility and some email clients.

  5. Keep file size under 102KB - Gmail clips larger emails.

  6. Add proper TypeScript types - Define interfaces for all email props.

  7. Include preview props - Add `.PreviewProps` to components for development testing.

  8. Handle errors - Always check for errors when sending emails.

  9. Use verified domains - For production, use verified domains in `from` addresses.

Common Patterns

See references/PATTERNS.md for complete examples including:

  • Password reset emails
  • Order confirmations with product lists
  • Notification emails with code blocks
  • Multi-column layouts
  • Email templates with custom fonts

Additional Resources

相关技能

寻找 react-email 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
开发者工具