Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

ChainOfThought

Open .md
Live preview

Loading example…

Collapsible list of reasoning steps with a status rail.

import { ChainOfThought } from "@jcsoftdev/ui/ai";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/ai/chain-of-thought.

<ChainOfThought
title="Razonamiento"
duration="4 s"
defaultOpen
steps={[
{
id: "1",
label: "Entender el pedido",
detail: "El cliente quiere un turno el sábado por la mañana.",
status: "done",
},
{
id: "2",
label: "Consultar la agenda de Diego",
detail: "Tres huecos libres entre 10:00 y 12:00.",
status: "done",
},
{ id: "3", label: "Proponer el horario más cercano", status: "done" },
]}
/>
Prop Type Default Description
steps * ThoughtStep[]
title string "Razonamiento" Header text; while any step is active it shimmers.
duration string Pre-formatted total time shown in the header, e.g. 4 s.
open boolean
defaultOpen boolean false
onOpenChange ((open: boolean) => void)
className string
classNames Partial<Record<ChainOfThoughtPart, string>> Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last.

* marks a required prop.

packages/ui/src/ai/chain-of-thought/chain-of-thought.tsx