Mixins / foldkit-mixins-ui

Chat

WidgetWhat it doesState
ChatMessageUser, assistant, or system message bubble (ChatMessage.group)Stateless
MessageScrollerAuto-scrolling role="log" with unread jump buttonSmall Model / Bundle
ThinkingIndicatorPolite live status indicator (dots, pulse, shimmer)Stateless
ThinkingStepsCollapsible trace of assistant steps and durationsApplication / Bundle
QuestionnaireMulti-step chat prompt form yielding Answered summarySmall Model
  • ChatMessage. Renders user bubbles at the inline end and assistant replies at the start; supports sending/sent/failed states with onRetry, hover/focus actions, and streaming: true (aria-busy with text-wrap: wrap). Render Markdown content with foldkit-richtext-markdown + foldkit-richtext-dom/view.
  • ThinkingIndicator. Mount with active: false before work starts so transitions to active announce cleanly in the polite live region; animations honor reduced motion.
  • ThinkingSteps. Displays pending, running, done, failed, or skipped steps (Option<boolean> openness auto-opens while running and closes on finish; Bundles.ThinkingSteps manages open step state).
  • Questionnaire. Composes single, multiple, and text Question schemas; update validates required answers, focuses missing prompts, and emits OutMessage.Answered({ answers }) before showing the summary.

MessageScroller

The log follows the newest message while the reader is at the end and stops when they scroll up, or when an upward wheel or ArrowUp, PageUp or Home arrives before that scroll. A Ctrl wheel, a wheel over a nested element that can scroll up itself, and a key another handler prevented, with Ctrl, Meta or Alt down, or typed into an input, textarea, select or editable element, do not count. A shorter viewport stays at the end while following. The messages and the text of a streamed answer are the application's.