Welcome

The greeting at the top of an empty chat: who the assistant is and what it can help with.

Code

Welcome is installed into your project as a file you own. It takes the same props as Ant Design X's Welcome. The kit adds no props of its own: it forwards ref and merges className, so every prop works the way the Ant Design X docs describe.

Install

npx antuikit@latest init
npx antuikit@latest add welcome
The first command installs AntuikitProvider and the theme tokens, the second adds this component.

Import

From @/components/ui/welcome, never from @ant-design/x. The file lives in your project, so the import is a path, not a package.
import { Welcome } from "@/components/ui/welcome"

Variant

  • filled (the default) puts the greeting on a light fill with rounded corners and padding. Use it on a plain page background.
  • borderless drops the fill and the padding and sets the title larger. Use it when the greeting already sits on a card, or as the hero of an empty chat.

Slots

Every prop besides variant takes a node.
  • title is the greeting, rendered as a heading.
  • description is the line under it. Use it to say what the assistant can do, not to repeat the title.
  • icon sits at the start, sized to the title and description together. An Avatar with size="large" fits it.
  • extra sits at the end of the title row, for one or two actions.
1
<Welcome
2
icon={<Avatar size="large">AI</Avatar>}
3
title="Hello, I'm your reading assistant"
4
description="Ask about a chapter, a character or a line."
5
extra={<Button aria-label="New chat" icon={<Icon name="plus" />} />}
6
/>

Styling

classNames and styles take the same five keys, one per part. Use them before a descendant selector: a part with a key keeps its name across versions.
1
<Welcome
2
classNames={{
3
root: "…",
4
icon: "…",
5
title: "…",
6
description: "…",
7
extra: "…",
8
}}
9
/>

API Reference

Welcome
Welcome's props. Rows marked antuikit in the Version column are added by the kit.