Package Exports
- @react-email/tailwind
- @react-email/tailwind/dist/index.js
- @react-email/tailwind/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@react-email/tailwind) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

@react-email/tailwind
A React component to wrap emails with Tailwind CSS.
Install
Install component from your command line.
With yarn
yarn add @react-email/tailwind -EWith npm
npm install @react-email/tailwind -EGetting started
Add the component around your email body content.
import { Button } from '@react-email/button';
import { Tailwind } from '@react-email/tailwind';
const Email = () => {
return (
<Tailwind
config={{
theme: {
extend: {
colors: {
'custom-color': '#ff0000',
},
},
},
}}
>
<Button
href="https://example.com"
className="text-custom-color bg-white mx-auto"
>
Click me
</Button>
</Tailwind>
);
};Support
This component was tested using the most popular email clients.
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
License
MIT License