For the complete documentation index, see llms.txt. This page is also available as Markdown.

React SDK

Embed the GreatStore chat in a React app with typed props and clean mount/unmount.

@greatstore/react drops the chat into a React app — a typed <GreatStore> component that mounts and unmounts with your component tree, so it fits single-page apps and route changes without hand-managing the script tag.

import { GreatStore } from "@greatstore/react";

<GreatStore store="my-store" />;

Only store is required. On top of that you get:

  • Typed props for appearance and the AI disclaimer — anything you leave unset falls back to your admin config.

  • A ref handle to drive the panel — open, close, sendMessage, updateModelContext, generateStructuredContent, ready, and more — the same capabilities as the JavaScript API, as methods.

  • SSR-safe rendering and a clean teardown on unmount, so nothing leaks across navigations.

Requires React 18 or newer.

The full prop and method reference ships with the package. View @greatstore/react on npm →

What's next?

JavaScript APICLI

Last updated

Was this helpful?