Documentation
Installation#
Using npm
Using CDN
or
Usage#
Note:
The Phone number should be entered in the international format without the +
sign. For eg:
If your number is +1 234-567-9898,
then you should enter the phone number as 12345679898
.
ES6 Module#
Script Tag#
Configuration Options#
Option | Type | Default | Description |
---|---|---|---|
phoneNumber |
string | '' |
WhatsApp number in international format without + symbol in front (required) |
message |
string | "I'm interested to know more about your offerings." |
Default message |
position |
string | 'bottom-right' |
Widget position ('top-left' , 'top-right' ,
'bottom-left' , 'bottom-right' )
|
backgroundColor |
string | '#25D366' |
Background color of the widget |
textColor |
string | '#fff' |
Color of the WhatsApp icon |
size |
string | '60px' |
Size of the widget |
showTooltip |
boolean | true |
Show/hide tooltip on hover |
tooltipText |
string | 'Chat with us' |
Text to show in tooltip |
Examples#
Basic Usage#
Custom Styling#
Multi-Language Support#
Dynamic Control#
Business Hours#
API Methods#
Method | Description |
---|---|
show() |
Shows the widget |
hide() |
Hides the widget |
destroy() |
Removes the widget from DOM |
updateOptions(options) |
Updates widget configuration |
Browser Support#
- Chrome (Latest)
- Firefox (Latest)
- Safari (Latest)
- Edge (Latest)
- Opera (Latest)