This component is designed to add Provide Support Live Chat widget to a web application.
To use it you need to have an account in Provide Support Live Chat system.
Demo in which the button is located in different places
This package is available in NPM repository as providesupport-live-chat-window-react. It works correctly with all popular bundlers.
npm install providesupport-live-chat-window-react --save
To start using live chat with React.js, import LiveChat component from the providesupport-live-chat-window-react package and pass your Provide Support account name or account hash as "company" parameter.
import React from 'react';
import { LiveChat } from 'providesupport-live-chat-window-react';
export default () => (
<div className="app">
<LiveChat company="account_name_or_hash" />
</div>
);
The LiveChat component should be as close to the root of the application as possible since it contains an iframe.
Prop name | Description | Is required | Default value |
---|---|---|---|
company | Account name specified during registration | ✓ | n/a |
isUploadAfterDocumentLoaded | Load chat button after page loads | ✖ | true |
(...otherParams) | All other parameters will be passed to the banner download URL | ✖ | n/a |