onipin-react: embed OniPin chat in your React app
Official OniChat package — floating bubble (widget) or iframe /c/{pin}. npm install onipin-react, no API keys: only the business pin.
The onipin-react package is the official component to integrate OniPin chat in React apps (Next.js, Vite, CRA…).
Installation
npm install onipin-react
Peer deps: React ≥ 18.
Floating bubble (same as the widget)
import { OniChat } from "onipin-react";
export function App() {
return <OniChat pin="onp_your_pin" />;
}
Embedded chat on the page
import { OniChat } from "onipin-react";
export function Support() {
return (
<OniChat
pin="onp_your_pin"
mode="iframe"
height={640}
title="Chat with us"
/>
);
}
Props
| Prop | Default | Description |
|---|---|---|
pin | — | Business pin (onp_…) |
baseUrl | https://onnivers.store | Server origin |
mode | "script" | "script" (widget) or "iframe" (/c/{pin}) |
height / width | 560 / 100% | iframe mode only |