thesys|
OpenUI
Generative UI Chat

OpenUI Chat SDK

A complete framework for building AI interfaces. Use our pre-built layouts for speed, or our headless hooks for total control.

Batteries-Included Layouts

Core Capabilities

Streaming Native

Handles text deltas, optimistic updates, and loading states automatically.

Thread Persistence

Built-in support for saving and loading conversation history via simple API contracts.

Theming

Customize every color, radius, and font using CSS variables or Tailwind.

Go Headless

Need full control? Use the `useChat` hook to build your own UI while we handle the state.

import { useChat } from '@openuidev/react';

function CustomChat() {
  const { messages, append, isLoading } = useChat();

  return (
    <div>
      {messages.map(m => (
        <div key={m.id}>
          {m.content}
        </div>
      ))}

      <input
        onChange={e => append(e.target.value)}
      />
    </div>
  );
}