Skip to main content

Installation

Requires React 18+. Styles are bundled—no additional CSS imports needed.

Quick Start

Get your model ID from DashboardModels.

Props

Connection

Chat

UI

Callbacks


Examples

With Suggestions

Model Selector

Proxy Mode (Production)

Route requests through your backend to hide tokens:
Your backend handles authentication and forwards to Cuadra AI.

External Controls


Theming

Override CSS variables:

Widget Mode (No Build)

Embed via script tag for non-React sites:

FAQ

Do I need a backend?

For production: yes. Never expose session tokens in client-side code. Use proxyUrl to route requests through your backend.

Does it support SSR?

The component is client-side only. Use dynamic imports with ssr: false in Next.js:

Can I customize the message rendering?

Not currently. The UI Kit provides opinionated styling. For full control, use the Chat API directly with your own components.

How do I handle authentication?

Get session tokens from your auth system (Stytch B2B) and pass to the sessionToken prop. Tokens refresh automatically with your auth flow.

Build a Chatbot

Full tutorial with backend

Authentication

Token setup