Back to React Email

Readme

packages/html/readme.md

0.0.152.9 KB
Original Source

<div align="center"><strong>@react-email/html</strong></div> <div align="center">A React html 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/html -E

With npm

sh
npm install @react-email/html -E

Getting started

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

jsx
import { Button } from "@react-email/button";
import { Html } from "@react-email/html";

const Email = () => {
  return (
    <Html lang="en">
      <Button href="https://example.com" style={{ color: "#61dafb" }}>
        Click me
      </Button>
    </Html>
  );
};

Support

This component was tested using the most popular email clients.

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

License

MIT License