# question-prompt
Multiple-choice Q&A for ambiguous tasks. Pin the active prompt to TerminalWindow footer — not SessionContent. After selection, show QuestionAnswerSummary in the transcript.
──
examples
Basic choices
Keyboard-navigable options with a built-in custom answer row.
What would you like me to help you with right now?
5
[1/1] ↑/↓ navigate · Enter: select · last option: type custom
Answered
After selection, show QuestionAnswerSummary in SessionContent (or selectedId on QuestionPrompt for the same summary UI).
What would you like me to help you with right now?
nice
──
install
npx shadcn@latest add "https://www.terminal-kit.com/r/question-prompt.json"
──
component api
QuestionPrompt
Multiple-choice ask_user UI. Mount the active prompt on TerminalWindow footer (swap with Input while open) — do not put it in SessionContent. After the user answers, render QuestionAnswerSummary in the transcript (or pass selectedId on QuestionPrompt in footer if you keep it there).
PropTypeDefaultDescription
question *stringQuestion text shown above options.
options *QuestionOption[]Choices to render. Shape: { id: string; label: string; description?: string }.
selectedIdstringWhen set, renders QuestionAnswerSummary instead of the prompt.
answerstringAnswer text for the summary when selectedId is set. Defaults to the selected option label.
answeredHeaderstring"User answered Claude's questions:"Header line for the Claude-style answered summary.
layout"auto" | "card" | "bubble" | "panel""auto"auto — Claude flat list, default soft card, grok numbered panel. bubble/card/panel force a specific style.
trailingOptionQuestionOptionOptional row below a divider after the custom option (e.g. Chat about this). Claude layout only.
initialActiveIndexnumber0Highlight this option on mount (0-based).
indexnumber1Current question index for multi-step flows (1-based).
totalnumber1Total questions in a multi-step flow.
customOptionLabelstring"Something else…"Label for the built-in custom answer row.
customOptionPlaceholderstring"Type your answer"Placeholder for the custom answer field.
onSelect(id: string, customValue?: string) => voidCalled when the user selects an option or submits a custom answer.
classNamestringAdditional CSS classes.