SDK Documentation

First-class SDKs for React, Next.js and vanilla JavaScript.

Installation

Install the package with your preferred package manager.

npm install @supportflow/react
# or
pnpm add @supportflow/react

React SDK

Wrap your app and render the widget anywhere in the tree.

import { SupportProvider, SupportWidget } from "@supportflow/react";

export default function App() {
  return (
    <SupportProvider apiKey={process.env.NEXT_PUBLIC_SF_KEY!}>
      <YourApp />
      <SupportWidget position="bottom-right" />
    </SupportProvider>
  );
}

Next.js SDK

The SDK is SSR-safe. Render the provider in your root layout; the widget mounts client-side automatically.

Vanilla JS

No framework? Use the script tag from Getting Started and control the widget through the global SupportFlow object.

  • SupportFlow.open() — open the widget
  • SupportFlow.identify(user) — set user context
  • SupportFlow.on('ticket:created', cb) — listen for events

See it in your app
in 2 minutes.

Embed the widget, connect your knowledge base, and give every user instant help — with full context for your team.