Mixins / foldkit-mixins-ui
QuestionnaireSlots
const · packages/mixins-ui/src/questionnaire.ts:33
const QuestionnaireSlots: Slots.Contract<{ readonly root: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly title: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly progress: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly question: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly prompt: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly words: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Intera …;An assistant asking the reader structured questions in the chat, as
Claude Code's and ChatGPT's clarifying questions: a single choice (the
package's RadioGroup), a multiple choice (its CheckboxGroup), or free text
(its Input or Textarea), each choice question with an optional "Other"
field, asked all at once or one at a time, and sent with a submit. The
questions, the answers so far and the radio groups' focus are a Model of
this module's, which the application keeps and folds with update; once
every question that must be is answered, the submit comes out as
OutMessage.Answered, and the form gives way to a summary of the answers.
A submit with one missing says so beside it and moves the focus to it, as
Next does to the next question. The parts the reused components draw are
styled by their own recipes, passed beside this one's style.