React component for whatsapp click to chat
npm i react-whatsapp
// OR
yarn add react-whatsapp
Demo Link
Local demo:
git clone https://github.com/andrelmlins/react-whatsapp.git
cd react-whatsapp
npm install && npm run start
import React from 'react';
import { render } from 'react-dom';
import ReactWhatsapp from 'react-whatsapp';
const App = () => (
<ReactWhatsapp number="1-212-736-5000" message="Hello World!!!" />
);
render(<App />, document.getElementById('root'));
Prop | Default | Type | Description |
---|---|---|---|
number | -- | string | Phone number |
message | -- | string | Message for chat |
element | button | element | Either a string to use a HTML element or a component. |
Download stats for this NPM package
React Whatsapp is open source software licensed as MIT.