New advertisers: 50% off your first month with code FIRSTMONTHSee slots
vercel-labs avatar

React Email

Renders JSON element specs into HTML or plain-text emails using React Email components and a custom catalog.

skills.sh installs
1.4K
GitHub stars
19.8K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers spec structure with a root Html element, a Container layout, and the flat elements map shared with @json-render/react
  • Provides renderToHtml and renderToPlainText server APIs, plus defineRegistry for custom components like an Alert block
  • Includes standard components for document structure, layout, content, and a Markdown utility, all using inline styles for client compatibility
  • Designed for transactional and marketing emails built from JSON or AI-generated specs, with visible, $state, and repeat support

Install

$ npx -y skills add vercel-labs/json-render --skill react-email -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

@json-render/react-email

React Email renderer that converts JSON specs into HTML or plain-text email output.

Quick Start

import { renderToHtml } from "@json-render/react-email";
import { schema, standardComponentDefinitions } from "@json-render/react-email";
import { defineCatalog } from "@json-render/core";

const catalog = defineCatalog(schema, {
  components: standardComponentDefinitions,
});

const spec = {
  root: "html-1",
  elements: {
    "html-1": { type: "Html", props: { lang: "en", dir: "ltr" }, children: ["head-1", "body-1"] },
    "head-1": { type: "Head", props: {}, children: [] },
    "body-1": {
      type: "Body",
      props: { style: { backgroundColor: "#f6f9fc" } },
      children: ["container-1"],
    },
    "container-1": {
      type: "Container",
      props: { style: { maxWidth: "600px", margin: "0 auto", padding: "20px" } },
      children: ["heading-1", "text-1"],
    },
    "heading-1": { type: "Heading", props: { text: "Welcome" }, children: [] },
    "text-1": { type: "Text", props: { text: "Thanks for signing up." }, children: [] },
  },
};

const html = await renderToHtml(spec);

Spec Structure (Element Tree)

Details

Repository
github.com/vercel-labs/json-render
Categories
Frontend & UI Code, Email & Messaging
First seen
May 16, 2026

More from vercel-labs/json-render

All 30

Similar to React Email

More Frontend & UI Code