Skip to Content
zjkm-ui-ai-elements

Chain of Thought

A collapsible component that visualizes AI reasoning steps with support for search results, images, and step-by-step progress indicators.

The ChainOfThought component provides a visual representation of an AI's reasoning process, showing step-by-step thinking with support for search results, images, and progress indicators. It helps users understand how AI arrives at conclusions.

Loading preview…

Installation

npm i zjkm-ui-ai-elements
import {  ChainOfThought,  ChainOfThoughtHeader,  ChainOfThoughtStep,  ChainOfThoughtSearchResults,  ChainOfThoughtSearchResult,  ChainOfThoughtContent,  ChainOfThoughtImage,} from "zjkm-ui-ai-elements/chain-of-thought";

First time? Add the package's styles: see Setup.

Features

  • Collapsible interface with smooth animations powered by Radix UI
  • Step-by-step visualization of AI reasoning process
  • Support for different step statuses (complete, active, pending)
  • Built-in search results display with badge styling
  • Image support with captions for visual content
  • Custom icons for different step types
  • Context-aware components using React Context API
  • Fully typed with TypeScript
  • Accessible with keyboard navigation support
  • Responsive design that adapts to different screen sizes
  • Smooth fade and slide animations for content transitions
  • Composable architecture for flexible customization

Props

<ChainOfThought />

Prop

Type

<ChainOfThoughtHeader />

Prop

Type

<ChainOfThoughtStep />

Prop

Type

<ChainOfThoughtSearchResults />

Prop

Type

<ChainOfThoughtSearchResult />

Prop

Type

<ChainOfThoughtContent />

Prop

Type

<ChainOfThoughtImage />

Prop

Type

On this page