Skip to documentation content

Chat Welcome

Open a new conversation with a greeting, what the assistant can do, a composer, and prompts to start from.

chat-welcome-demo

Overview

Chat Welcome is what a new conversation opens on: a greeting, a line on what the assistant can help with, and a few Prompt Suggestions to start from.

Give it a composer for a full-page start, or drop it into Chat Thread's emptyMessage, where it gives way to the first message.

Anatomy

ChatWelcome
  • IconYour assistant's mark, above the title
  • TitleThe greeting
  • DescriptionWhat the assistant can help with
  • ComposerAn optional slot, such as a Prompt Bar
  • SuggestionsPrompt Suggestions, when you pass them

Installing chat-welcome brings Prompt Suggestions along.

Behavior

Suggestions

Pass suggestions and onSelectSuggestion to show starters. A common choice is to put the prompt in the composer, so the person can change it before sending. suggestionsLayout takes the same layouts as Prompt Suggestions.

Alignment

center suits a new chat page. start aligns everything to the left, for a narrow side panel.

Accessibility

The welcome is a region named by its title, which is a level-two heading. The icon is decorative. The suggestions behave as in Prompt Suggestions.

Installation

npx honestui@latest add chat-welcome

Usage

import { ChatWelcome } from "@/components/ai/chat-welcome"
import { PromptBar } from "@/components/ai/prompt-bar"

<ChatWelcome
  title="What should we look into?"
  description="Ask about invoices, payouts, or a failed export."
  composer={<PromptBar value={draft} onValueChange={setDraft} onSubmit={send} />}
  suggestions={starters}
  onSelectSuggestion={(suggestion) => setDraft(suggestion.prompt)}
/>

Examples

In a Chat Thread

As the thread's empty state.

chat-welcome-thread

API reference

ChatWelcome

Accepts native section props beyond those listed.

PropTypeDefaultDescription
titleReactNodeRequiredThe greeting.
descriptionReactNodeNoneWhat the assistant can help with.
iconReactNodeNoneA decorative mark above the title.
suggestionsPromptSuggestion[]NonePrompt starters.
onSelectSuggestion(suggestion) => voidNoneCalled with the chosen starter. Needed to show them.
suggestionsLayout"wrap" | "scroll" | "list""wrap"How the starters are laid out.
composerReactNodeNoneA composer under the greeting.
align"center" | "start""center"Centered, or aligned to the start.
disabledbooleanfalseTurns the starters off.
labelsPartial<ChatWelcomeLabels>EnglishThe starters' accessible name.