FluxyChat

Packages

@fluxy-chat/ui-kit

FluxyChatWidget and FluxyInboxPanel, built on @fluxy-chat/ui.

@fluxy-chat/ui-kit

Widget and inbox panel. Use this when you do not want to assemble ChatWindow yourself.

Built on @fluxy-chat/ui + @fluxy-chat/react. Optional bridge to assistant-ui via useFluxyAssistantRuntime.

Install

pnpm add @fluxy-chat/ui-kit @fluxy-chat/ui @fluxy-chat/react @fluxy-chat/sdk

Your app needs Tailwind (same as @fluxy-chat/ui). Member JWT or guest plus publishableKey (pk_) on a public room.

FluxyChatWidget

import { FluxyChatWidget } from "@fluxy-chat/ui-kit";

<FluxyChatWidget
  roomId="general"
  workerUrl={process.env.NEXT_PUBLIC_FLUXYCHAT_WORKER_URL!}
  guest
  publishableKey={process.env.NEXT_PUBLIC_FLUXYCHAT_PUBLISHABLE_KEY}
  height={520}
/>

Pass token instead of guest when you already have a member JWT. The widget feeds ChatWindow occupancy, typing, edit/delete/react, room-reaction bursts, load-older, and a discontinuity banner from useChat.

Props

PropTypeDescription
roomIdstringRoom to join (required)
workerUrlstringWorker base URL (required unless client is passed)
tokenstringMember JWT (unless client or guest)
guestbooleanCall joinPublicRoomAsGuest (public room, no JWT)
publishableKeystringBrowser pk_ key. Required with guest on hosted public rooms
displayNamestringGuest display name
clientFluxyChatClientPre-built client — share one instance with inbox
userIdstringDefault "user-1" when constructing client internally
themeFluxyThemeIddefault, dark, minimal, or brand
heightnumber | stringWidget height (default 480)
titlestringHeader label (defaults to roomId)
classNamestringExtra wrapper classes

Inbox panel

import { FluxyInboxPanel } from "@fluxy-chat/ui-kit";

<FluxyInboxPanel
  workerUrl={workerUrl}
  token={token}
  onSelectItem={(item) => openRoom(item.roomId)}
/>

Lists rooms/conversations and calls onSelectItem when the user picks one — pair with FluxyChatWidget and a shared FluxyChatClient for a full inbox + thread UX.

assistant-ui (optional)

pnpm add @assistant-ui/react
import { useExternalStoreRuntime, Thread } from "@assistant-ui/react";
import { useFluxyAssistantRuntime } from "@fluxy-chat/ui-kit";
import { FluxyChatClient } from "@fluxy-chat/sdk";

const client = new FluxyChatClient({ baseUrl: workerUrl, userId, token });
const { externalStoreProps } = useFluxyAssistantRuntime({ roomId: "general", client });
const runtime = useExternalStoreRuntime(externalStoreProps);

return <Thread runtime={runtime} />;

Scaffold with CLI

Fastest path — minimal Vite app with the widget only:

npx @fluxy-chat/create-fluxy-chat@latest my-chat --minimal

See create-fluxy-chat for flags and templates.

When to use ui-kit vs ui

NeedPackage
Drop-in widget or inbox in an existing appui-kit
Custom layout, design system, headless primitives@fluxy-chat/ui
Dashboard-grade agent room (templates, tools, voice)Dashboard FluxyChat or compose from ui primitives

On this page