Reasoning Block

Collapsible AI reasoning block, folded by default. The title shimmers while the model is thinking, then reads Thought for Ns, with an animated height reveal.

src/registry/ui/reasoning-block.tsx/r/reasoning-block.json

Installation#

bash
npx shadcn@latest add @minidev/reasoning-block

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/reasoning-block.json

Usage#

tsx
import { ReasoningBlock } from "@/components/ui/reasoning-block"

export function Example() {
  return (
    <ReasoningBlock>
      Considered layout density, Hairline borders, and tabular numbers for prices.
    </ReasoningBlock>
  )
}

API reference#

ReasoningBlock props
PropTypeDefault
titlestring"Thinking"
childrenReact.ReactNode"Compared density against the table s...
defaultOpenbooleanfalse
activebooleanfalse
durationstring-
classNamestring-

Dependencies#

npm

lucide-react

Built from

No other MiniDev files

Examples#

All AI chat UI components for React

Learn more