Skip to content
Playground

Trace

A composable sequence of agent steps, tool activity, progress, and expandable details.

Trace presents the work behind an answer as a compact sequence of readable steps. It is useful for agent reasoning summaries, tool activity, file operations, build progress, and other process history. Zenos keeps the root and lines semantically neutral so the surrounding product can choose the right list, status, link, or disclosure semantics.

Thinking through the request
package.json, Message.tsx, MessageScroller.tsx, and index.ts
Updated the conversation layoutTypecheck failed1 error
TSX
import { Trace } from "@zentara-co/zenos-ui";
TSX
<Trace>  <Trace.Line status="running" role="status">    <Trace.Icon>      <SpinnerIcon />    </Trace.Icon>    <Trace.Title>Checking dependencies</Trace.Title>    <Trace.Description>2.4s</Trace.Description>  </Trace.Line></Trace>

Trace.Icon is decorative and always hidden from assistive technology. Put the meaning of the step in Trace.Title. Trace.Description is optional metadata such as elapsed time, a count, or a short result.

Omit status for completed work. Use running, pending, or error for the remaining visual states. Status only changes presentation; add role="status" when a newly rendered running step should be announced.

Completed workspace scanChecking dependenciesGenerate release notesPublish preview failed

Use the collapsible parts when a concise step has optional details. They follow the same controlled and uncontrolled open-state contract as Collapsible.

Trace.tsx6.2 kBTrace.test.tsx2.1 kBindex.ts0.5 kB
TSX
<Trace.Collapsible defaultOpen>  <Trace.CollapsibleTrigger>    <Trace.Line>      <Trace.Title>Read component files</Trace.Title>    </Trace.Line>  </Trace.CollapsibleTrigger>  <Trace.CollapsibleContent>Trace.tsx and Trace.test.tsx</Trace.CollapsibleContent></Trace.Collapsible>

Trace.Line is a non-interactive span. Wrap it with a native link, button, dialog trigger, or another appropriate interactive component rather than adding click behavior to the line itself.

Every part accepts className and style. Use these escape hatches to adjust spacing or emphasis without replacing the component’s state and accessibility behavior.

Trace uses logical spacing and text alignment. The disclosure indicator follows the current document direction. Mirror directional application icons with rtl:rotate-180 when their meaning changes.

Variants

completerunningpendingerror
Trace.Root
Trace.Line
Trace.Icon
Trace.Title
Trace.Description
Trace.Collapsible
Trace.CollapsibleTrigger
Trace.CollapsibleContent

API

PropTypeDefaultDescription
Line.status running | pending | error — Optional visual state. Omit the status for a completed step.
Collapsible open / defaultOpen boolean false Controlled or initial visibility of the detail panel.
Collapsible onOpenChange (open: boolean, eventDetails) => void — Runs when the trace detail panel opens or closes.
CollapsibleContent.keepMounted boolean false Keeps the detail panel mounted while closed.
Line / Icon / Title / Description HTMLAttributes<HTMLSpanElement> — Forward native attributes, refs, styles, classes, and data attributes.
native props React.HTMLAttributes<HTMLDivElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

  • Keep every step’s meaning in Trace.Title; icons are decorative.
  • Add role="status" only to new progress that should be announced, not to static history.
  • Wrap interactive lines in native controls with a clear accessible name.
  • Do not communicate running, pending, or error state through color alone; write descriptive text when the state affects the user’s next action.
  • The collapsible trigger supplies button semantics, keyboard interaction, and expanded state.

The component is adapted to Zenos conventions from the shadcn Trace pattern.