@supafeed/sdk
v0.1.2
Published
Drop-in feedback widget with AI-powered follow-up conversations
Maintainers
Readme
@supafeed/sdk
Drop-in feedback widget for web apps. It launches a bottom-corner feedback UI, runs a short conversational flow, and sends sessions to the SupaFeed backend.
Install
npm install @supafeed/sdkQuick start
import { init } from "@supafeed/sdk";
init({
apiKey: "ff_live_xxx",
position: "bottom-right",
});The widget theme is resolved server-side from your SupaFeed organization settings using the API key. Configure styling in the SupaFeed dashboard.
API
init(config)mounts the widget and returns the instance.destroy()unmounts the widget and cleans up all listeners.
React provider usage
import { SupaFeedProvider } from "@supafeed/sdk/react";
export function AppProviders({ children }: { children: React.ReactNode }) {
return (
<SupaFeedProvider
config={{
apiKey: "ff_live_xxx",
}}
>
{children}
</SupaFeedProvider>
);
}Config
apiKey(string, required): Your SupaFeed API key.position("bottom-right" | "bottom-left"): trigger placement.user(UserInfo, optional): metadata about the current user.
Pass user info
<SupaFeedProvider
config={{
apiKey: "ff_live_xxx",
user: {
id: currentUser.id,
email: currentUser.email,
name: currentUser.name,
},
}}
>
{children}
</SupaFeedProvider>