@ftw/email-builder

A React-based tool for building modern, responsive email templates which degrade "gracefully" in older clients.

Stats

StarsIssuesVersionUpdatedCreatedSize
@ftw/email-builder
0.0.253 years ago3 years agoMinified + gzip package size for @ftw/email-builder in KB

Readme

Email Builder

A React-based tool for building modern, responsive email templates which degrade "gracefully" in older clients.

Getting Started

  1. Create a "package.json" file (yarn init)

  2. Run yarn add "@ftw/email-builder" "react@>=16.3 <17" "react-dom@>=16.3 <17"

  3. Add a "start" script to your "package.json":

    {
      "scripts": {
        "start": "email-builder develop"
      }
    }
    
  4. 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);
    
  5. Run yarn start in your project directory and open http://localhost:5000 in your browser.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.