1.0.3 • Published 5 years ago
choosify v1.0.3
Choosify
Add the Choosify chat plugin to your website.
Installation
npm install choosify
# or
yarn add choosifyUsage
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 chatsubtitle. Subtitle of the chat window. Default:Any questions? Chat with us.iconColor. Color of the icon in hexadecimal format. Default:#0b5cd5icon. Icon image. Default: message iconheaderColor. Color of the header in hexadecimal format. Default: same asiconColoroperatorName. Sender name for automated replies. Default:OperatoroperatorIcon. Sender avatar for automated replies. Default: robot icon
Methods
destroy()
Completely remove the plugin from the page.
Example:
choosify.destroy();