# Chain of Thought URL: /components/chain-of-thought --- title: Chain of Thought description: A collapsible component that visualizes AI reasoning steps with support for search results, images, and step-by-step progress indicators. path: elements/components/chain-of-thought --- 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. ## Installation ## Usage ```tsx import { ChainOfThought, ChainOfThoughtContent, ChainOfThoughtHeader, ChainOfThoughtImage, ChainOfThoughtSearchResult, ChainOfThoughtSearchResults, ChainOfThoughtStep, } from "@/components/ai-elements/chain-of-thought"; ``` ```tsx Result 1 ``` ## 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 ### `` void', }, '...props': { description: 'Any other props are spread to the root div element.', type: 'React.ComponentProps<"div">', }, }} /> ### `` ', }, }} /> ### `` ', }, }} /> ### `` ', }, }} /> ### `` ', }, }} /> ### `` ', }, }} /> ### `` ', }, }} />