Skip to content
Sign upPro
BillingPersona onboardingMenu

Persona onboarding (Pro)

ProIncluded in $99

Role and goal questions that tailor the first chat, with that chat drawn beside them and redrawn on every answer.

ProThree questions about role, goals and answer style, with the first chat redrawn beside them on every answer.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/persona-onboarding

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { PersonaOnboarding } from "@/components/ui/chatcn/pro/persona-onboarding"

<PersonaOnboarding
  questions={[
    { id: "role", title: "What do you do?", options: [{ value: "design", label: "Design" }, …] },
    { id: "goals", title: "What will you use it for first?", multiple: true, options: […] },
  ]}
  tailor={(answers) => ({
    greeting: "Hi. Here is where designers usually start.",
    starters: [{ title: "Critique this flow", reason: "For designers", from: "role" }],
    defaults: [{ label: "Model", value: "Claude Sonnet 5.5", from: "goals" }],
  })}
  onDone={(answers, preview) => saveWorkspace(answers, preview)}
  onSkip={useDefaults}
/>

One question at a time, single or pick any, and every one can be skipped: Next reads Skip question until something is picked. tailor turns the answers into the first chat (a greeting, starters and defaults such as the model or answer style) and runs on every change, so the preview beside the question is always the real result. Only what an answer changed moves: starters that stay keep their place and new ones rise in. Tag a starter or default with from, the question that shaped it, and it is outlined while that question is on screen, so the reader sees what each answer is for before giving it. Wide frames put the preview beside the questions; narrow ones put it underneath.

Examples

States

ProNothing answered yet, the goals question with what it shapes lit, and a narrow frame where the preview stacks.

Props

PropTypeNotes
questionsPersonaQuestion[]{ id, title, hint?, options, multiple? }
tailor(answers) => PersonaPreview{ greeting, starters, defaults? }; keep it pure
value, defaultValue, onValueChangeRecord<string, string[]>The answers
step, defaultStep, onStepChangenumberThe question on screen
onDone(answers, preview) => voidStart chatting, on the last question
onSkip() => voidShows Skip setup
labelsPartial<PersonaOnboardingLabels>Every string, for translation

Keyboard

KeyAction
TabMoves between the choices and the buttons
Arrow keysMove between choices
Enter, SpacePick a choice

Accessibility

  • Choices are toggle buttons in a group named by the question, and report whether they are pressed.
  • Stepping moves focus to the new question's heading.
  • The preview is a labelled region and its greeting is announced politely when it changes.

Motion

A new question slides in 12 px from the side it came from over 220 ms. New starters and defaults rise 4 px over 240 ms; unchanged ones stay still. Nothing moves on first paint or under reduced motion.