@ftw/email-builder

    0.0.25 • Public • Published

    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.

    Keywords

    none

    Install

    npm i @ftw/email-builder

    DownloadsWeekly Downloads

    52

    Version

    0.0.25

    License

    MIT

    Unpacked Size

    138 kB

    Total Files

    91

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar