Ballmac UI home

AI Chat 2: conversation with artifact panel

A chat that builds things: conversation list, streaming replies, suggestion chips and a side panel with Preview and Code tabs, version history, copy and download. The panel overlays the chat on narrow screens.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/ai-chat-2

Usage

Example: ai-chat-2-demo.tsx
import { AiChat2 } from "@/components/ballmac/blocks/ai-chat-2/ai-chat-2"

export default function AiChat2Demo() {
  return <AiChat2 />
}

Dependencies

Use with AI

An assistant UI that produces artifacts. Pass versions=[{ code, preview, note }], defaultMessages, suggestions and onSend(prompt) returning { reply, artifact? } (the 1-based version the reply moves to). Without onSend a built-in script lets you try the whole flow. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI AI Chat 2: conversation with artifact panel (@ballmac/ai-chat-2) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Assistants that write code, documents or designs
  • Anywhere results deserve their own panel with versions

Not for

  • A plain chat pane (use ai-chat-1)

Registry JSON: https://ui.ballmac.com/r/ai-chat-2.json

Free to use in personal and commercial projects.