Multi Select
Open in playgroundPick up to N options. A capped counter shows remaining capacity; unselected cards dim at the limit so users know why they can't pick more.
Preview
Usage
import { MultiSelect } from "@/components/socratic-ui/multi-select";
<MultiSelect
question="What matters most right now?"
max={3}
options={[
{ title: "Speed to market" },
{ title: "Polish & quality" },
]}
value={priorities}
onChange={setPriorities}
/>
API Reference
| Prop | Type | Default |
|---|---|---|
questionrequiredThe headline shown above the options. | string | — |
subtitleOptional supporting copy beneath the question. | string | — |
optionsrequiredThe list of selectable options. | { title: string; subtitle?: string }[] | — |
maxMaximum selectable options. Unselected cards dim once the cap is hit. | number | 3 |
valuerequiredTitles of the currently selected options. | string[] | — |
onChangerequiredCalled when the selection changes. | (value: string[]) => void | — |
numberOptional leading question number. | string | — |
iconLayoutHow icons align relative to their label. `vertical` stacks icon above label for a tile-style layout. | "horizontal" | "vertical" | "horizontal" |
iconAlignmentHorizontal alignment of the icon within its slot. Only applies when `iconLayout` is `"vertical"`. | "left" | "center" | "left" |
motionOpt-in entrance animation config. Omit for static rendering; pass `{ enabled: true }` (or a preset from `motion.ts`) to animate in on mount. | SocraticMotion | — |