Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Trace

The building block for reasoning, tool calls, sources and more.

Thought for 5s
Writing the fix 2 sources

Installation

pnpm add @heyramzi/ui bits-ui

Usage

import * as Trace from "@heyramzi/ui/shadcn/trace";
<Trace.Root>
  <Trace.Collapsible>
    <Trace.CollapsibleTrigger>
      <Trace.Line>
        <Trace.Title>Ran pnpm --version</Trace.Title>
      </Trace.Line>
    </Trace.CollapsibleTrigger>
    <Trace.CollapsibleContent>12.10.1</Trace.CollapsibleContent>
  </Trace.Collapsible>
  <Trace.Line status="running">
    <Trace.Title>Writing the fix</Trace.Title>
    <Trace.Description>2 sources</Trace.Description>
  </Trace.Line>
</Trace.Root>

Keyboard and accessibility

Key Does
Tab Moves focus to the next step that opens.
Space Enter Opens or closes the focused step.
  • A step that opens is a button that reports open or closed.
  • The step icons are hidden from screen readers, so the title has to say what happened, like "Run failed".
  • The trace isn't a live region. New steps aren't read out.
  • With reduced motion on, the running shimmer and the open animation stop.

API reference

Trace.Root

ref bindable HTMLDivElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLDivElement> from svelte/elements
Prop Type Default
ref bindable HTMLDivElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLDivElement> from svelte/elements

Trace.Line

status "running" | "error" | "pending"
ref bindable HTMLSpanElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements
Prop Type Default
status "running" | "error" | "pending"
ref bindable HTMLSpanElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements

Trace.Icon

ref bindable HTMLSpanElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements
Prop Type Default
ref bindable HTMLSpanElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements

Trace.Title

ref bindable HTMLSpanElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements
Prop Type Default
ref bindable HTMLSpanElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements

Trace.Collapsible

ref bindable HTMLElement | null
Default null
open bindable boolean
Default false
class string
...rest
Every prop of Collapsible.Root from bits-ui
Prop Type Default
ref bindable HTMLElement | null null
open bindable boolean false
class string
...rest Every prop of Collapsible.Root from bits-ui

Trace.CollapsibleTrigger

ref bindable HTMLElement | null
Default null
class string
children Snippet
...rest
Every prop of Collapsible.Trigger from bits-ui except child
Prop Type Default
ref bindable HTMLElement | null null
class string
children Snippet
...rest Every prop of Collapsible.Trigger from bits-ui except child

Trace.CollapsibleContent

ref bindable HTMLElement | null
Default null
class string
children Snippet
...rest
Every prop of Collapsible.Content from bits-ui except child
Prop Type Default
ref bindable HTMLElement | null null
class string
children Snippet
...rest Every prop of Collapsible.Content from bits-ui except child

Trace.Description

ref bindable HTMLSpanElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements
Prop Type Default
ref bindable HTMLSpanElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements