Chain of Thought

The ChainOfThought component provides a visual indicator of the AI's thought process with optional stop functionality.

Installation

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/chain-of-thought.json

Examples

Advance

Props

Chain Of Thought

NameTypeDefault
children
Snippet
class
string

Chain Of Thought Step

NameTypeDefault
children
Snippet
class
string
isLast
boolean false
open
boolean
onOpenChange
(open: boolean) => void
...props
CollapsibleRootProps

Chain Of Thought Trigger

NameTypeDefault
children
Snippet
class
string
leftIcon
Snippet
swapIconOnHover
boolean true
...props
CollapsibleTriggerProps

Chain Of Thought Content

NameTypeDefault
children
Snippet
class
string
...props
CollapsibleContentProps

Chain Of Thought Item

NameTypeDefault
children
Snippet
class
string
...props
HTMLAttributes<HTMLDivElement>