AI Welcome State
Onboarding screen with example prompts for AI chat interfaces. Features a branded header, 2-column grid of clickable prompt cards with icons, and keyboard shortcut hint.
Preview
Default welcome screen with example prompts
Welcome to Horizon AI
I'm here to help you plan, prioritize, and achieve your goals. Start with a prompt below or type your own question.
Custom Content
Custom heading, description, and prompts
Welcome to CodeAssist
Your AI pair programming companion. Pick a task or describe what you need.
Without Keyboard Hint
Hide the keyboard shortcut footer
Welcome to Horizon AI
I'm here to help you plan, prioritize, and achieve your goals. Start with a prompt below or type your own question.
Props
AIWelcomeState component API reference
| Prop | Type | Default | Description |
|---|---|---|---|
heading | string | 'Welcome to Horizon AI' | Main heading text |
description | string | 'I\'m here to help you plan, prioritize...' | Subheading/description text |
prompts | ExamplePrompt[] | (default prompts) | Array of example prompts to display |
onPromptSelect | (prompt: string) => void | — | Callback when a prompt card is clicked |
showKeyboardHint | boolean | true | Show the keyboard shortcut hint footer |
keyboardHintText | string | 'for commands or just start typing' | Text after the "/" key hint |
className | string | — | Additional CSS classes for the container |
ExamplePrompt Type
| Prop | Type | Default | Description |
|---|---|---|---|
icon* | LucideIcon | — | Icon component to display |
title* | string | — | Short title for the prompt card |
prompt* | string | — | Full prompt text (returned on click) |
color | ColorVariant | — | Color theme for the icon (default: indigo) |
ColorVariant
"indigo" |"teal" |"amber" |"violet" |"rose" |"emerald"
Usage
Import and implementation example
import { AIWelcomeState } from '@/blocks/ai-conversation/ai-welcome-state'
import { ListTodo, Calendar, Target, Zap } from 'lucide-react'
export default function Example() {
const prompts = [
{
icon: ListTodo,
title: 'Plan my day',
prompt: 'Help me prioritize my tasks for today',
color: 'indigo',
},
{
icon: Calendar,
title: 'Schedule focus time',
prompt: 'Block 2 hours of deep work this week',
color: 'teal',
},
{
icon: Target,
title: 'Set weekly goals',
prompt: 'Break down my Q1 objectives into milestones',
color: 'amber',
},
{
icon: Zap,
title: 'Boost productivity',
prompt: 'Analyze my task patterns and suggest improvements',
color: 'violet',
},
]
const handlePromptSelect = (prompt: string) => {
// Insert prompt into chat input
setInputValue(prompt)
inputRef.current?.focus()
}
return (
<AIWelcomeState
heading="Welcome to Horizon AI"
description="I'm here to help you plan, prioritize, and achieve your goals."
prompts={prompts}
onPromptSelect={handlePromptSelect}
keyboardHintText="for commands or just start typing"
/>
)
}Features
Built-in functionality
- Branded header: Gradient sparkles icon with customizable heading and description
- Prompt card grid: 2-column grid of clickable example prompts
- Color-coded icons: Six color variants (indigo, teal, amber, violet, rose, emerald)
- Hover animations: Border highlight and arrow slide on hover
- Keyboard hint: Configurable "/" shortcut hint footer
- Line clamping: Prompt descriptions truncated to 2 lines
- Click callback: Returns full prompt text for input insertion
- Centered layout: Vertically centered with max-width container
- Dark mode: Full dark mode support with proper gradients
Accessibility
Accessibility considerations
ARIA Attributes
Prompt cards are native button elementsIcons are decorative and accompany visible textKeyboard hint uses semantic kbd elementKeyboard Navigation
| Key | Action |
|---|---|
| Tab | Navigate between prompt cards |
| Enter / Space | Select the focused prompt card |
Notes
- Cards have visible focus states from default button styling
- Prompt titles provide clear labels for each action
- Description text provides additional context
- Consider adding aria-label combining title and prompt for screen readers
- Arrow icon indicates the card is actionable