Agreement Spectrum
Open in playgroundLikert-rate a batch of statements on a 5-point agree/disagree scale. Optionally surface a ‘% of similar people agree’ comparison once each statement is rated — useful for provoking reflection, not just collecting data.
Preview
Usage
import { AgreementSpectrum } from "@/components/socratic-ui/agreement-spectrum";
<AgreementSpectrum
question="Where do you stand?"
statements={[
{ id: "public", text: "We should build in public from day one", crowd: 72 },
{ id: "ui", text: "A beautiful UI is table stakes", crowd: 85 },
]}
value={ratings}
onChange={setRatings}
/>
API Reference
| Prop | Type | Default |
|---|---|---|
questionrequiredThe headline shown above the statement rows. | string | — |
subtitleOptional supporting copy beneath the question. | string | — |
statementsrequiredThe statements to rate. `id` keys the response map; `crowd` is an optional ‘% of others who agree’ figure shown once rated. | { id: string; text: string; crowd?: number }[] | — |
scaleLabelsFive labels for the Likert scale. Only the last word of each label is rendered on the button. | string[] | Strongly disagree → Strongly agree |
valuerequiredMap of statement id → 0–4 scale index. | Record<string, number> | — |
onChangerequiredCalled when any statement's rating changes. | (value: Record<string, number>) => void | — |
numberOptional leading question number. | 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 | — |