@chyeon/danbi-react
v0.1.6
Published
React chat widget for Danbi
Readme
@chyeon/danbi-react
React chat widget for Danbi.
import { DanbiChat, DanbiProvider } from "@chyeon/danbi-react";
export function HelpButton() {
return (
<DanbiProvider tokenEndpoint="/api/danbi/token" collectDomContext>
<DanbiChat launcher="button" buttonLabel="이 화면에서 도움 받기" />
</DanbiProvider>
);
}Use launcher="none" when the chat should open only through Cmd+K / Ctrl+K.
Your backend token endpoint should call Danbi's /api/widget/token with x-danbi-secret.
The browser only receives a short-lived client token and the public widget API base URL.
