SSocratic UI

Open Questions

Open in playground

A stack of open-ended prompts, each with its own auto-growing textarea. Use when the AI needs every blank filled in one shot — not a sequence and not a single freeform field.

Preview

05

Help me understand what you're hitting

A few sentences each is plenty.

0 of 3 answered
unanswered
unanswered
unanswered

Usage

import { OpenQuestions } from "@/components/socratic-ui/open-questions";

<OpenQuestions
  question="Help me understand what you're hitting"
  prompts={[
    { id: "goal", text: "What are you trying to make happen?" },
    { id: "tried", text: "What have you tried so far?" },
    { id: "stuck", text: "Where exactly does it break?" },
  ]}
  value={answers}
  onChange={setAnswers}
/>

API Reference

PropTypeDefault
questionrequired

Overall heading for the set of prompts, shown above the stack.

string
subtitle

Optional supporting copy beneath the heading.

string
promptsrequired

Prompts to ask. Each id becomes a key in the value/onChange map.

{ id: string; text: string; placeholder?: string }[]
valuerequired

Prompt id → user-entered text.

Record<string, string>
onChangerequired

Called whenever any prompt's textarea is edited.

(value: Record<string, string>) => void
completeMessage

Success summary shown when every prompt is answered.

string"Thanks — that gives me what I need to dig in."
number

Optional leading question number (e.g. "05").

string
motion

Shared motion config threaded through entrance animations.

SocraticMotion