Skip to main content
The ThinkingBlock component provides a visual representation of AI Models’ reasoning process during message generation. It features a collapsible accordion interface, auto-scrolling for real-time content updates, and clear state indicators for active thinking vs completed thoughts.

Installation

Install the ThinkingBlock component using the shadcn CLI:

Usage

Props

UIMessage
required
The message object containing reasoning parts. The component extracts and displays text from parts with type “reasoning”.
boolean
required
Controls the accordion trigger text and state. Shows “Thinking” when false (active) and “Thoughts” when true (completed).