Calm motion: animations on this site only fade, with no movement
Reasoning
The thinking of a model, in a panel that folds
Shows the reasoning of a model above its reply. While the model thinks, the panel is open and the head says "Thinking…". At the end, the panel closes and the head says how long the model thought. For a call to a tool, use the tool call.
Basic
Thought for 8 s
The user wants the show notes as a list. I will keep the links and drop the ads.
- Give the text so far in
text, or put your own content in the default slot. The text keeps its line breaks. - Set
streamingwhile the model thinks. A soft light runs over the head, and the body hasaria-busy. If the reader asks for less motion, the light does not run. - If the reader does not touch the panel, it opens when the model starts and closes at the end. A reader who opens or closes the panel keeps that choice.
- The time is the time that
streamingwas on. For a reply from the history, give the time in seconds withduration. With no time, the head says "Reasoning". v-model:openreads or sets the state of the panel.- The panel is a native
detailselement, so the keyboard and screen readers know it. Change the words withlabelsor a label pack:thinking,thought(a function of the seconds), anddone.
Usage
ts
import { BlessReasoning } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
text | string | — | the reasoning text so far; or put it in the default slot |
streaming | boolean | — | the model is still thinking: the panel is open and the head says so |
duration | number | — | how long the model thought, in seconds; default: the time it was streaming |
labels | Partial<{ thinking: string; thought: (seconds: number) => string; done: string; }> | — | |
open | boolean | — | open while it streams, and it closes at the end unless the reader opened or closed it |
Events
| Name | Payload | Description |
|---|---|---|
update:open | [value: boolean | undefined] |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |