0.0.10 • Published 10 days ago

@react-email/markdown v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

React Email Markdown cover

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 ✔Apple Mail ✔Outlook ✔Yahoo! Mail ✔HEY ✔Superhuman ✔

License

MIT License

0.0.10

10 days ago

0.0.9

1 month ago

0.0.9-canary.0

2 months ago

0.0.2

10 months ago

0.0.8

5 months ago

0.0.5

8 months ago

0.0.7

7 months ago

0.0.6

8 months ago

0.0.1

11 months ago