āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/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.
npx ai-elements@latest add chain-of-thought
import {
ChainOfThought,
ChainOfThoughtContent,
ChainOfThoughtHeader,
ChainOfThoughtImage,
ChainOfThoughtSearchResult,
ChainOfThoughtSearchResults,
ChainOfThoughtStep,
} from '@/components/ai-elements/chain-of-thought';
<ChainOfThought defaultOpen>
<ChainOfThoughtHeader />
<ChainOfThoughtContent>
<ChainOfThoughtStep
icon={SearchIcon}
label="Searching for information"
status="complete"
>
<ChainOfThoughtSearchResults>
<ChainOfThoughtSearchResult>
Result 1
</ChainOfThoughtSearchResult>
</ChainOfThoughtSearchResults>
</ChainOfThoughtStep>
</ChainOfThoughtContent>
</ChainOfThought>
| Prop | Type | | open? | boolean | | defaultOpen? | boolean | | onOpenChange? | (open: boolean) => void | | ...props? | React.ComponentProps<"div"> |
| Prop | Type | | children? | React.ReactNode | | ...props? | React.ComponentProps<typeof CollapsibleTrigger> |
| Prop | Type | | icon? | LucideIcon | | label? | string | | description? | string | | status? | "complete" | "active" | "pending" | | ...props? | React.ComponentProps<"div"> |
| Prop | Type | | ...props? | React.ComponentProps<"div"> |
| Prop | Type | | ...props? | React.ComponentProps<typeof Badge> |
| Prop | Type | | ...props? | React.ComponentProps<typeof CollapsibleContent> |
| Prop | Type | | caption? | string | | ...props? | React.ComponentProps<"div"> |
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā