Gathering detailed insights and metrics for md-to-react-email
Gathering detailed insights and metrics for md-to-react-email
Gathering detailed insights and metrics for md-to-react-email
Gathering detailed insights and metrics for md-to-react-email
Lightweight utility for converting Markdown into valid React Email templates
npm install md-to-react-email
Typescript
Module System
Node Version
NPM Version
98.3
Supply Chain
99.5
Quality
78.4
Maintenance
100
Vulnerability
99.6
License
TypeScript (100%)
Total Downloads
19,884,938
Last Day
31,317
Last Week
631,015
Last Month
2,703,501
Last Year
18,219,662
MIT License
37 Stars
146 Commits
13 Forks
1 Watchers
4 Branches
5 Contributors
Updated on Jul 02, 2025
Minified
Minified + Gzipped
Latest Version
5.0.5
Package Id
md-to-react-email@5.0.5
Unpacked Size
58.14 kB
Size
10.63 kB
File Count
8
NPM Version
10.8.2
Node Version
20.18.1
Published on
Dec 06, 2024
Cumulative downloads
Total Downloads
Last Day
-5.2%
31,317
Compared to previous day
Last Week
-4.5%
631,015
Compared to previous week
Last Month
18.4%
2,703,501
Compared to previous month
Last Year
994.1%
18,219,662
Compared to previous year
1
1
Read the documentation here
md-to-react-email is a lightweight utility for converting Markdown into valid JSX that can be used in React-email or JSX-email templates. This tool simplifies the process of creating responsive and customizable email templates by leveraging the power of React and Markdown.
Note: Starting from version 4
, md-to-react-email
uses Marked
for markdown transformation. see all changes here
The following markdown flavors are supported
Install from your command line.
1yarn add md-to-react-email
1npm install md-to-react-email
camelToKebabCase
: converts strings from camelcase ['thisIsCamelCase'] to kebab case ['this-is-kebab-case']parseCssInJsToInlineCss
: converts css styles from css-in-js to inline css e.g fontSize: "18px" => font-size: 18px;parseMarkdownToJSX
: parses markdown to valid JSX for the client (i.e the browser)EmailMarkdown
: a react component that takes in markdown input and parses it directly in your code baseDirectly as React-email
or JSX-email
component
```
import {EmailMarkdown} from "md-to-react-email"
export default function EmailTemplate() {
return (
<Email>
<Head />
<Section>
<EmailMarkdown markdown={`# Hello, World!`} />
</Section>
</Email>
)
}
```
Directly into react-email template
```
import {parseMarkdownToJSX} from "md-to-react-email"
const markdown = `# Hello World`
const parsedReactMail = parseMarkdownToJSX({markdown})
console.log(parsedReactMail) // `<h1 style="...valid inline CSS...">Hello, World!</h1>`
```
md-to-react-email contains pre-defined react and html components for the email template structure and styling. You can modify these components to customize the look and feel of your email template.
The following components are available for customization:
The provided React components and default styling are designed to work well across various email clients and providers. However, due to the inconsistent support for modern web standards in different email clients, it's recommended to test your email templates in multiple clients to ensure compatibility.
The following email clients are known to be supported:
Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
Contributions to md-to-react-email are welcome! If you find a bug, have suggestions for improvements, or want to add new features, feel free to open an issue or submit a pull request. Please make sure to follow the existing coding style and conventions.
When submitting a pull request, provide a clear description of the changes made and ensure that all tests pass. Adding appropriate tests for new features or bug fixes is highly appreciated.
For bugs and feature requests, please create an issue.
md-to-react-email
is licensed under the MIT License.
No vulnerabilities found.
No security vulnerabilities found.