1.0.6 • Published 2 years ago

vanilla-whatsapp v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

vanilla-whatsapp

vanilla-whatsapp cover

Table of contents

Installation & Usage

npm i vanilla-whatsapp
  1. Import the plugin: add a script tag pointing to vanilla-whatsapp.js
<html>
    <head>
    <link rel="stylesheet" href="<path-to-vanilla-whatsapp.css>">
    <script defer src="<path-to-vanilla-whatsapp.js>"></script>
    </head>
    <body>
        <!-- body content -->    
    </body>
</html>
  1. Run the plugin
window.initVanillaWhatsapp();

Customization

const whatsappData = {
  phoneNumber: "3432132132",
  positionButtonWhatsapp: {
    top: "",
    right: "15%",
    bottom: "2%",
    left: "",
  },
  images: {
    pathUserLogo: "",
  },
  replaceText: {
    header: {
      userName: "User name",
      slogan: "Usually responds the same day",
    },
    bodyChat: {
      messageOne: "Hello 👋",
      messageTwo: "How can I help you?",
    },
    linkToWhatsappButtonText: "Send message",
  },
};
window.initVanillaWhatsapp(whatsappData);

Note: phone number must be preceded by the country prefix in the default option is 34 the prefix of Spain

Vanilla-whatsapp in React

https://codesandbox.io/s/vanilla-whatsapp-react-35gtww?file=/src/App.js

"Buy Me A Coffee"

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago