Goals / Non-Goals
Open in playgroundPaired list builder. For every goal, name a non-goal — the symmetry is the whole point. Classic framing tool for scoping a product spec.
Preview
Usage
import { GoalsNonGoals } from "@/components/socratic-ui/goals-non-goals";
const [value, setValue] = useState([]);
<GoalsNonGoals
question="Goals & non-goals"
subtitle="For each goal, name a non-goal."
value={value}
onChange={setValue}
maxPairs={5}
/>
API Reference
| Prop | Type | Default |
|---|---|---|
questionrequiredThe headline shown above the pair list. | string | — |
subtitleOptional supporting copy beneath the question. | string | — |
valuerequiredControlled list of pair rows. Includes partial / in-progress rows — use response parsing to drop incomplete pairs. | { goal: string; nonGoal: string }[] | — |
onChangerequiredCalled whenever the user types, adds, or removes a pair. | (value: { goal: string; nonGoal: string }[]) => void | — |
goalPlaceholderPlaceholder for the goal input. | string | — |
nonGoalPlaceholderPlaceholder for the non-goal input. | string | — |
maxPairsUpper bound on how many rows 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 | — |