@ftw/email-builder
v0.0.25
Published
A React-based tool for building modern, responsive email templates which degrade "gracefully" in older clients.
Downloads
39
Keywords
Readme
Email Builder
A React-based tool for building modern, responsive email templates which degrade "gracefully" in older clients.
Getting Started
Create a "package.json" file (
yarn init
)Run
yarn add "@ftw/email-builder" "react@>=16.3 <17" "react-dom@>=16.3 <17"
Add a "start" script to your "package.json":
{ "scripts": { "start": "email-builder develop" } }
Create an "emails/EMAIL_NAME" directory and add an
index.js
file as an entry point for your email:// emails/newsletter/index.js import * as React from 'react'; import { Email, Section, renderEmail } from '@ftw/email-builder'; function Newsletter() { return ( <Email> <Section align="center"> <Section maxWidth={650} padding={{ top: 50, bottom: 80, left: 20, right: 20 }} > Hello world! </Section> </Section> </Email> ); } renderEmail(Newsletter);
Run
yarn start
in your project directory and open http://localhost:5000 in your browser.