nypr-react-mailchimp-subscribe

1.0.2 • Public • Published

react-mailchimp-subscribe

npm package

React Ajax subscribe form for Mailchimp.

Working demo : https://codesandbox.io/s/5wyqr6npw4

Usage

Create a list on mailchimp, add a form and get its "action" attribute

import SubscribeFrom from 'react-mailchimp-subscribe'
 
const formProps = {
  action: '//xxxx.us13.list-manage.com/subscribe/post?u=695fze434a101fd2a718afddde8&id=72al97ece5',
  messages: {
    inputPlaceholder: "Votre email",
    btnLabel: "Envoyer",
    sending: "Envoi en cours...",
    success: "Merci de votre intérêt!",
    error: "Oops, impossible d'enregistrer cette adresse"
  },
  styles: {
    sending: {
      fontSize: 18,
      color: "auto"
    },
    success: {
      fontSize: 18,
      color: "green"
    },
    error: {
      fontSize: 18,
      color: "red"
    }
  }
}
 
const Form = () => <SubscribeFrom {...formProps}/>
 

Readme

Keywords

Package Sidebar

Install

npm i nypr-react-mailchimp-subscribe

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mikehearn
  • dianaparrington
  • jjnypr
  • nypr