Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-email/markdown

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-email/markdown

Convert Markdown to valid React Email template code.

  • 0.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

React Email Markdown cover

@react-email/markdown
Convert Markdown to valid React Email template code.

Website · Documentation · Twitter

Install

Install component from your command line.

With yarn
yarn add @react-email/markdown -E
With npm
npm install @react-email/markdown -E

Getting started

Add the component around your email body content.

import { Markdown } from "@react-email/markdown";
import { Html } from "@react-email/html";

const Email = () => {
  return (
    <Html lang="en" dir="ltr">
      <Markdown
        markdownCustomStyles={{
          h1: { color: "red" },
          h2: { color: "blue" },
          codeInline: { background: "grey" },
        }}
        markdownContainerStyles={{
          padding: "12px",
          border: "solid 1px black",
        }}
      >{`# Hello, World!`}</Markdown>

      {/* OR */}

      <Markdown children={`# This is a ~~strikethrough~~`} />
    </Html>
  );

Props

children field

  • Type: string

Contains the markdown content that will be rendered in the email template.

markdownCustomStyles field

  • Type: object
  • Default: {}

Provide custom styles for the corresponding HTML element (e.g., p, h1, h2, etc.).

markdownContainerStyles field

  • Type: object
  • Default: {}

Provide custom styles for the containing div that wraps the markdown content.

Support

This component was tested using the most popular email clients.

Gmail logoApple MailOutlook logoYahoo! Mail logoHEY logoSuperhuman logo
Gmail ✔Apple Mail ✔Outlook ✔Yahoo! Mail ✔HEY ✔Superhuman ✔

License

MIT License

Keywords

FAQs

Package last updated on 22 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc