Try:

How to use

01Import the component
import { ChatOnboarding } from '@/components/shitui/ChatOnboarding';
02Quick Start

Render Chat Onboarding with modern built-in AI developer onboarding defaults.

export default function OnboardingModal() {
return (
  <div className="flex min-h-[500px] w-full items-center justify-center p-4">
    <ChatOnboarding
      brandName="Acme AI"
      onComplete={(answers) => {
        console.log('Onboarding completed:', answers);
        // Send to your backend API or database
      }}
    />
  </div>
);
}
03Custom Questions & Types

Pass your own questions with single-select, multi-select, and custom validation.

import { ChatOnboarding, type OnboardingStep } from '@/components/shitui/ChatOnboarding';

const customSteps: OnboardingStep[] = [
{
  id: 'name',
  label: 'Full Name',
  question: "What's your full name?",
  placeholder: 'Enter your name',
  type: 'text',
},
{
  id: 'workspace',
  label: 'Workspace',
  question: (ans) => `Great to meet you, ${ans.name}! What should we name your workspace?`,
  placeholder: 'My AI Studio',
  type: 'text',
},
{
  id: 'plan',
  label: 'Plan',
  question: 'Select your team tier',
  type: 'single-select',
  options: ['Starter', 'Pro', 'Enterprise'],
},
{
  id: 'goals',
  label: 'Goals',
  question: 'What are your main goals?',
  helperText: 'Select all that apply',
  type: 'multi-select',
  options: ['Code Generation', 'Automated Testing', 'Internal Chatbot', 'Other'],
},
];

export default function CustomOnboarding() {
return (
  <ChatOnboarding
    brandName="Nexus"
    steps={customSteps}
    accentColor="#3074fe"
    confirmButtonText="Launch"
    onComplete={(answers) => fetch('/api/user/setup', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(answers),
    })}
  />
);
}

Props

PropTypeDefaultDescription
brandNamestring'Shit AI'Brand name displayed in the chat header and completion headline.
stepsOnboardingStep[]DEFAULT_ONBOARDING_STEPSArray of onboarding steps with type, questions, options, and validators.
accentColorstring'#3074fe'Accent hex color for user chat bubbles, primary action buttons, and active options.
successColorstring'#22c55e'Hex color for the celebration checkmark, comet trail, and burst particles.
confirmButtonTextstring'Launch'Label text for the final confirmation button on the review step.
expandedHeightnumber420Height in pixels when expanded into interactive chat mode.
initialPlaceholderstringsteps[0].placeholderPlaceholder text displayed in the compact initial input pill.
completionTitlestring | ((answers: OnboardingAnswers) => string)Welcome to {brandName}, {name}!Custom headline string or dynamic callback displayed upon completion.
completionSubtitlestring'Your AI workspace is configured and ready.'Subtitle text displayed below the completion headline.
autoFocusbooleanfalseWhether the initial compact input pill automatically focuses on mount.
onComplete(answers: OnboardingAnswers) => voidundefinedCallback function triggered with all collected answers when confirmed.
onStepChange(stepIndex: number, step: OnboardingStep) => voidundefinedCallback function triggered whenever the active question step changes.
onReset() => voidundefinedCallback function triggered when the user resets or restarts the onboarding flow.
logoReact.ReactNode<DefaultBrandLogo />Custom brand logo rendered inside the compact pill and chat header.
classNamestringundefinedOptional CSS class name applied to the outer container.