Skip to content

AiPrompts

AiPrompts provides elegant cards or list layouts for suggestions and quick actions.

Basic Usage

Horizontal prompt cards.

💡 Suggestions
Write a Vue 3 componentComposition API component
How to implement debounce?Functional programming patterns
Explain RAG to mePrinciples of Augmented Generation
Basic Usage

Vertical Layout

Vertical layout is recommended when space is limited.

🚀 Quick Actions
Reset ConversationClear history and start over
Export ChatGenerate Markdown and download
Vertical Layout

Custom Theme

Use theme-overrides to personalize component styles.

🎨 Custom Theme
Custom Blue ThemeApplied via themeOverrides
Custom Theme

API

Props

NameDescriptionTypeDefault
itemsPrompt data list(AiPromptItem | string)[][]
layoutLayout mode: horizontal vertical waterfallstring'horizontal'
titleTop header textstring''
theme-overridesTheme variables overrideAiPromptsThemeVars

Events

NameDescriptionCallback Parameters
clickEmitted when item is clicked(item: AiPromptItem | string) => void

Slots

NameDescriptionSlot Scope
titleCustom title area
itemCustom item rendering{ item: AiPromptItem | string, index: number }
iconCustom internal icon{ icon: string }

Use in Nuxt

This component fully supports Nuxt 3/4. In Nuxt projects, the component will be automatically imported.

For detailed configuration, please see Nuxt Integration.

Theme Variables

Variable NameDescriptionDefault Value
--yh-ai-prompts-bg-colorContainer background colorvar(--yh-bg-color)
--yh-ai-prompts-border-colorBorder colorvar(--yh-border-color)
--yh-ai-prompts-border-radiusBorder radiusvar(--yh-border-radius-base)
--yh-ai-prompts-header-font-sizeHeader font size14px
--yh-ai-prompts-item-min-heightItem minimum height48px
--yh-ai-prompts-active-border-colorActive/hover border colorvar(--yh-color-primary)
--yh-ai-prompts-item-hover-bg-colorItem hover background colorvar(--yh-color-primary-light-9)
--yh-ai-prompts-hover-text-colorItem hover text colorvar(--yh-color-primary)
--yh-ai-prompts-icon-sizeIcon size20px
--yh-ai-prompts-icon-colorIcon colorvar(--yh-color-primary)

Released under the MIT License.