Quick Estimate
Open in playgroundTwo or three related single-select dimensions stacked vertically. Purpose-built for constraints that only make sense in pairs — budget + timeline is the canonical case.
Preview
Usage
import { QuickEstimate } from "@/components/socratic-ui/quick-estimate";
const [value, setValue] = useState<Record<string, string | null>>({});
<QuickEstimate
question="Budget & timeline constraints"
dimensions={[
{
id: "budget",
label: "Budget range",
options: [
{ title: "< $5k" },
{ title: "$5–20k" },
],
},
{
id: "timeline",
label: "Timeline",
options: [
{ title: "2 weeks" },
{ title: "1 month" },
],
},
]}
value={value}
onChange={setValue}
/>
API Reference
| Prop | Type | Default |
|---|---|---|
questionrequiredThe overall headline above the stacked dimensions. | string | — |
subtitleOptional supporting copy beneath the question. | string | — |
dimensionsrequiredTwo or three independent single-select lists. Each dimension has its own label and options. | { id: string; label: string; options: { title: string; subtitle?: string }[] }[] | — |
valuerequiredMap of dimension id to the title of the selected option (or null if unset). | Record<string, string | null> | — |
onChangerequiredCalled whenever a selection changes in any dimension. | (value: Record<string, string | null>) => void | — |
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 | — |