Back to React Email

Readme

packages/body/readme.md

0.0.153.1 KB
Original Source

<div align="center"><strong>@react-email/body</strong></div> <div align="center">A React body component to wrap emails.</div> <div align="center"> <a href="https://react.email">Website</a> <span> · </span> <a href="https://react.email">Documentation</a> <span> · </span> <a href="https://react.email">Twitter</a> </div>

Install

Install component from your command line.

With yarn

sh
yarn add @react-email/body -E

With npm

sh
npm install @react-email/body -E

Getting started

Add the component to your email template. Include styles where needed.

jsx
import { Html } from "@react-email/html";
import { Body } from "@react-email/body";
import { Section } from "@react-email/section";
import { Column } from "@react-email/column";

const Email = () => {
  return (
    <Html lang="en">
      <Body style={{ backgroundColor: "#61dafb" }}>
        <Section>
          <Column style={{ width: "50%" }}></Column>
          <Column style={{ width: "50%" }}></Column>
        </Section>
      </Body>
    </Html>
  );
};

Support

This component was tested using the most popular email clients.

Gmail ✔Apple Mail ✔Outlook ✔Yahoo! Mail ✔HEY ✔Superhuman ✔

License

MIT License