Skip to content

AiWelcome 欢迎页面 ​

AiWelcome 是一个用于 AI 聊天对话起始页面的组件,通过精美的渐变色和玻璃拟态设计,为用户提供友好的第一印象和交互引导。

基础用法 ​

展示 Logo、标题及建议的 Prompt 列表。

基础用法 ​

展示 Logo、标题及建议的 Prompt 列表。

基础用法

自定义图标与 Slot ​

你可以自定义 Logo 图标或通过插槽完全自定义头部内容。

自定义图标与 Slot

API ​

Props ​

属性名说明类型默认值
title标题文本string''
description描述文本string''
suggestions建议项列表AiSuggestion[][]
showIcon是否展示图标booleantrue
icon图标名称string'sparkles'

AiSuggestion Item ​

属性名说明类型
icon图标名称string
title建议项标题string
description详细描述string
prompt点击后传递的指令文本string

Events ​

事件名说明回调参数
select点击建议列表卡片时触发(item: AiSuggestion)

Slots ​

插槽名说明
default底部自定义内容
icon自定义 Logo
title自定义标题
description自定义描述

主题变量 ​

变量名默认值
--yh-ai-welcome-paddingvar(--yh-spacing-xl)
--yh-ai-welcome-max-width800px
--yh-ai-welcome-primary-gradientlinear-gradient(135deg, var(--yh-color-primary) 0%, #a855f7 100%)
--yh-ai-welcome-card-bgvar(--yh-bg-color-overlay)

Released under the MIT License.