1.0.3 • Published 4 years ago
choosify v1.0.3
Choosify
Add the Choosify chat plugin to your website.
Installation
npm install choosify
# or
yarn add choosify
Usage
import Choosify from 'choosify';
const choosify = Choosify('abc123');
Where abc123
is your Choosify site ID listed on your Choosify dashboard.
That's it. The plugin should now load on your page.
Alternative installation and usage
Instead of installation via the npm or yarn package manager, Choosify can be imported using a script tag.
To do so, add the following code inside your html <head>
or <body>
:
<script src="https://plugin.choosify.chat/plugin.js"></script>
<script>var choosify = Choosify('abc123');</script>
Where abc123
is your Choosify site ID listed on your Choosify dashboard.
Options
The plugin can be customized by passing options when loading it, e.g. as follows:
const choosify = Choosify('abc123', {
title: 'Any questions?',
iconColor: '#4ab563'
});
Available options are:
title
. Title of the chat window. Default:Live chat
subtitle
. Subtitle of the chat window. Default:Any questions? Chat with us.
iconColor
. Color of the icon in hexadecimal format. Default:#0b5cd5
icon
. Icon image. Default: message iconheaderColor
. Color of the header in hexadecimal format. Default: same asiconColor
operatorName
. Sender name for automated replies. Default:Operator
operatorIcon
. Sender avatar for automated replies. Default: robot icon
Methods
destroy()
Completely remove the plugin from the page.
Example:
choosify.destroy();