User Story Builder
Open in playgroundRepeatable "As a ___, I want ___, so that ___" composer with per-slot chip suggestions. Canonical for product specs — every story is an explicit user + outcome pair, not a feature blurb.
Preview
Usage
import { UserStoryBuilder } from "@/components/socratic-ui/user-story-builder";
const [value, setValue] = useState([]);
<UserStoryBuilder
question="Write out a few user stories"
personas={["new user", "admin"]}
actions={["sign up quickly", "invite my team"]}
outcomes={["I can start in under a minute"]}
value={value}
onChange={setValue}
/>
API Reference
| Prop | Type | Default |
|---|---|---|
questionrequiredThe overall headline shown above the story cards. | string | — |
subtitleOptional supporting copy beneath the question. | string | — |
valuerequiredControlled list of stories. Includes partial / in-progress stories; use response parsing to drop incomplete ones. | { persona: string; action: string; outcome: string }[] | — |
onChangerequiredCalled whenever a slot changes or a story is added / removed. | (value: { persona: string; action: string; outcome: string }[]) => void | — |
personasSuggestion chips for the "As a ___" slot. | string[] | — |
actionsSuggestion chips for the "I want to ___" slot. | string[] | — |
outcomesSuggestion chips for the "so that ___" slot. | string[] | — |
maxStoriesUpper bound on how many stories can be added (default 5). | number | — |
numberOptional leading question number, e.g. "01". | string | — |
motionOpt-in entrance animation config. Omit for static rendering; pass `{ enabled: true }` (or a preset from `motion.ts`) to animate in on mount. | SocraticMotion | — |