logoassistant-ui
Styled Components

Thread

Overview

The raw message list and message composer UI. Useful for full screen chat use cases.

Getting Started

Import CSS styles

Add the following to your tailwind.config.ts:

/tailwind.config.ts
{
  plugins: [
    require("tailwindcss-animate"), // make sure to "npm install tailwindcss-animate"
    require("@assistant-ui/react/tailwindcss")({
      components: ["thread"],
    })
  ],
}

Use it in your app

/app/page.tsx
import { Thread, useEdgeRuntime } from "@assistant-ui/react";
 
const MyApp = () => {
  const runtime = useEdgeRuntime({
    api: "/api/chat",
  });
 
  return (
    <div className="h-full">
      <Thread runtime={runtime} />
    </div>
  );
};

On this page

Edit on Github