New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

react-olark-plugin

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-olark-plugin

React component to render an Olark chatbox on your page

0.0.2
Version published
Weekly downloads
4.3K
-27.4%
Maintainers
1
Weekly downloads
 
Created

react-olark-plugin

React component to render an Olark chatbox on your page. This is based on the work completed by jgnewman. This component adds additional functionality that allows configuration for box configuration by Olark e.g. olark.configure('box.inline', true);.

How it works

  • Sign up for Olark at olark.com. After signing up, you'll have access to your unique site ID.
  • Import Olark from react-olark-plugin and pass it your site id.
  • That's it!
import Olark from 'react-olark-plugin';

import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(
  <Olark siteId={YOUR_SITE_ID} />
, document.getElementById('root'));

Note that you should not use the Olark JavaScript snippet on your page if you are using react-olark because it will be automatically generated for you.

Options

Olark allows you to to configure your chatbox in lots of cool ways. These mainly come in the form of "system" configurations, "locale" configurations and "box" configurations. System values change how the chatbox does things, locale values allow you to customize text strings for use with different languages and box values allow you to customise the box whether it is inline or not and if it starts hidden or not etc.

You can pass these configuration options to the Olark component as props:

<Olark
  siteId={YOUR_SITE_ID}
  systemConfig={{ hb_dark_theme: true, ... }}
  localeConfig={{ chatting_title: 'Chat ki a tatou!', ... }}
  boxConfig={{ box.inline: true }}
/>

Styling

React-olark-plugin will generate a div with the id olark-box-container. Once the chatbox has successfully loaded, that div will be given an extra class called olark-loaded. You can use these labels to do simple things like specify position and size. However, further customizations should mostly be handled through the Olark dashboard.

FAQs

Package last updated on 21 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts