React
/ The widget as a React component, for React, Next.js, and anywhere components live.
What it is
@humaner/react wraps the same hosted widget, with React props, SSR-safe loading, and open / close you control in code. Every widget feature, none of the script tag.
Coming soon. The API below is what we are building toward. Treat it as a preview.
Install
Terminal
npm install @humaner/reactUse it
app/page.tsx
import { HumanerChat } from '@humaner/react';
export default function Page() {
return (
<HumanerChat
agentId="ag_demo123"
position="bottom-right"
/>
);
}| Prop | Type | What it does |
|---|---|---|
| agentId | string | Your public agent ID |
| position | "bottom-right" | "bottom-left" | Where the bubble sits |
| color | string | Accent color |
| greeting | string | One-off greeting override for this embed |
| defaultOpen | boolean | Open the panel as soon as it mounts |