@mahdivajdi/widget-react
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

RayChat widget installer for ReactJS/NextJS

raychat

The new online chat experience begins here!

Get closer to your leads and customers with a website chat widget. Adding a chat widget to your website will make your customer service experience even more exceptional.

Install

npm i @raychat/widget-react

Use in ReactJS

Get token from raychat.io

Wrote to App.js:

import Raychat from "@raychat/widget-react";

function App() {
  return (
    <div className="App">
      <!-- other components -->

      <Raychat token="6d5b4ba5-xxxx-xxxx-xxxx-48498f3fc2a2" type="normal" />
    </div>
  );
}

Use in NextJS (js/ts)

Get token from raychat.io

Wrote to _app.js/_app.tsx

import Raychat from "@raychat/widget-react";

export default function App({ Component, pageProps }: AppProps) {
  return (
    <div>
      <Component {...pageProps} />;
      <Raychat token="6d5b4ba5-xxxx-xxxx-xxxx-48498f3fc2a2" type="normal" />
    </div>
  );
}

Props

props required defaultValue description
token true undefined Get token from raychat.io
type false normal The type of script: [normal, fast-laod, seo-friendly]

License

MIT

Author

Mahdi Vajdi
Github: @mahdi-vajdi
Email: mahdivajdii@gmail.com

Package Sidebar

Install

npm i @mahdivajdi/widget-react

Homepage

raychat.io

Weekly Downloads

3

Version

0.5.0

License

MIT

Unpacked Size

24.2 kB

Total Files

12

Last publish

Collaborators

  • mahdivajdi