AI Chat Interface

A reusable, customizable AI Chat Interface component. Features streaming responses, markdown rendering, syntax highlighting, and multiple layouts.

application-ui Premium Plan

Availability

Included in Premium Plans

This flagship component is part of Future UI's monthly & yearly Premium plans and is not distributed via the free public CLI.

Import

import { AIChat } from "@/components/ui/ai-chat"
Layout Variant
Color Theme
Input Variant
Shape
Spacing

Named Keys & Props

Pass these exact named keys as props on <AIChat />. Click any color pill to copy the prop.

colorDefault is "default"(Black & White)
variantVisual style
"standard""floating""command""multiline""workspace"
shapeCorner shape
"default""square""rounded""sharp"
spacingInner spacing
"default""2x""4x""6x""8x"

Usage Example

A basic implementation example to get you started.

Example Implementation
import { AIChat, ChatMessages, ChatInput, ChatPromptSuggestions } from"@/components/ui/ai-chat";

export default function Example() {
 return (
 <AIChat messages={[]} input=""setInput={() => {}} onSubmit={() => {}}>
 <ChatMessages />
 <ChatPromptSuggestions suggestions={["Write a poem","Explain quantum computing"]} />
 <ChatInput />
 </AIChat>
 );
}

Features

Key capabilities and highlights.

Key Capabilities
  • ◆Multi-modal support with file and image uploads.
  • ◆Supports streaming messages with typing indicators.
  • ◆Markdown rendering powered by react-markdown and syntax highlighting.
  • ◆Fully customizable layouts (ChatGPT, Claude, Perplexity, Compact, Enterprise).
  • ◆Fully customizable input variants (Standard, Floating, Command, Multi-line).
  • ◆Built-in message actions (Copy, Regenerate, Edit, Upvote/Downvote).
  • ◆Prompt suggestions and workspace sidebars.

Notes

Important implementation details to consider.

Implementation Details
  • ◆Plan: Included in Future UI Monthly & Yearly Premium Plans.
  • ◆Usage: Use the <AIChat /> context provider to wrap chat subcomponents like <ChatMessages /> and <ChatInput />.
  • ◆Customization: Switch layouts using the layout prop and input styles via inputVariant.