YuhuanStudioYunUIDocs
AI

Thinking Block

A collapsible panel for a model's reasoning trace, with a live streaming indicator.

A collapsible panel for a model's reasoning/"thinking" trace. It manages its own open state, animates expand/collapse, and shows a live indicator while isStreaming. By default the content renders as pre-wrapped plain text; pass renderContent to plug in a Markdown renderer.

Import

import { ThinkingBlock } from "@yuhuanowo/yunui/ai";

Basic

Basic

The user is asking for the capital of France. That is Paris. I'll answer directly and concisely.

Streaming

While isStreaming is true the header shows an active badge and a blinking caret follows the text.

Streaming

Let me work through the steps one by one

Props

PropTypeDefaultDescription
content*string
defaultOpenbooleanfalse
isStreamingboolean
renderContent((content: string) => ReactNode)Render the reasoning content (e.g. with a Markdown renderer). Defaults to plain pre-wrapped text so YunUI carries no markdown dependency.

On this page