Prodular UI

Reasoning

AI

Collapsible model thinking: a shimmering Thinking label with a live timer while it runs, then Thought for 12s, collapsed.

npx prodular-ui add reasoning

Thinking

Opens while the model thinks so people can follow along, and collapses when it is done.

Done

Collapsed by default. The label carries the time spent.

Compared the three vendor quotes on total cost over 24 months, not the first year price. Kestrel is cheapest in year one but adds a 9% uplift at renewal, which makes Northbeam $11,800 cheaper over the full term.

Anatomy

<Reasoning streaming={isThinking}>  <ReasoningTrigger />  <ReasoningContent>{reasoningText}</ReasoningContent></Reasoning>

Guidance

Use it when

  • When the model exposes reasoning or a summary of it, above the answer it led to.
  • Keep it collapsed for history. People open it when they doubt an answer.

Avoid

  • Showing raw chain of thought your provider asks you not to show. Use a summary instead.
  • Putting the answer inside Reasoning. The answer belongs in Response.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Render Reasoning before tool calls and before Response inside the same assistant Message, in the order the model produced them.
  • Set streaming to true while reasoning tokens arrive and false as soon as the first answer token or tool call starts.
  • Pass duration in seconds when you load a finished message from history, so the label does not read 1s.
  • Do not render Reasoning for models that do not reason. No empty Thinking rows.

API

Reasoning

PropTypeDefaultDescription
streamingbooleanfalseShimmer, live timer and auto open while true.
durationnumberFinal thinking time in seconds. Measured automatically when omitted.
openWhileStreamingbooleantrueOpen while thinking and collapse when it ends.
open / defaultOpen / onOpenChangebooleanControl the expanded state.

ReasoningTrigger

PropTypeDefaultDescription
childrenReactNodeReplaces the automatic Thinking and Thought for label.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add reasoning# or, with the registry in components.jsonnpx shadcn@latest add @prodular/reasoning

Used in these screens