Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Galaco/react-mailerlite-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React MailerLite Form

React component for MailerLite forms.

Instructions

  1. Install dependency:
  • NPM: npm install @galaco/react-mailerlite-form
  • yarn: yarn add @galaco/react-mailerlite-form
  1. Add script
    import React from 'react'
    import ReactDOM from 'react-dom'
    import MailerLite from 'react-mailerlite-form'
    
    const MyMailerLiteForm = () => (
      <MailerLite
        code={123456}
        trackerId="vc2g234g2lewklfl23j4234"
        header={(<div>Some Instructions</div>)}
        submitButtonContent="Submit"
        submittingButtonContent="Submitting..."
        submissionComplete={(<div>Success!</div>)}
        emailPlaceholder="Enter your email..."
      />
    )
    
    ReactDOM.render(
      <MyMailerLiteForm />,
      document.getElementById('content')
    )

Configuration

  • All props are optional except code and trackerId. These 2 values can be obtained fom MailerLite in various ways. The easiest is probably to create a default template on MailerLite and extract the values through DOM inspection.
  • All other props, except emailPlaceholder accept null, string or react element

About

Simple react component for embedded MailerLite forms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published