Trace
Rows for agent steps — reasoning, tool calls, sources, and plans. Each line shares the same shape; wrap it in a collapsible, link, or overlay trigger to add behavior. Use Message for replies and Marker for notes between turns. Layout uses logical properties so nested borders and chevrons stay correct in RTL.
Basic
A TraceLine with an icon and title — plain text when nothing expands.
Installation
CLI
Also needs
npx @sonojs/ui@latest add collapsible && npm i lucide-reactComposition
structure
Usage
trace.tsx
Direction
Expand detail uses a start-edge border and start padding. The collapsible chevron is marked icon-dir so it mirrors in RTL.
direction.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| status | "running" · "error" · "pending" | — | On `TraceLine` — running shimmer, error color, or pending opacity. Omit when the step is done. |
| open | boolean | — | On `TraceCollapsible` — controlled open state (pair with `onOpenChange`). |
| defaultOpen | boolean | false | On `TraceCollapsible` — start expanded. |
| onOpenChange | (open: boolean) => void | — | On `TraceCollapsible` — called when open changes. |