RayChat widget installer for ReactJS/NextJS
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