Trace
The building block for reasoning, tool calls, sources and more.
12.10.1 package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)ERR_PNPM_OUTDATED_LOCKFILE pnpm-lock.yaml is not up to date with package.jsonInstallation
pnpm add @heyramzi/ui bits-uiUsage
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
refbindableHTMLDivElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLDivElement>fromsvelte/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"refbindableHTMLSpanElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLSpanElement>fromsvelte/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
refbindableHTMLSpanElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLSpanElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLSpanElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements | |
Trace.Title
refbindableHTMLSpanElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLSpanElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLSpanElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements | |
Trace.Collapsible
refbindableHTMLElement | null- Default
null openbindableboolean- Default
false classstring...rest- Every prop of
Collapsible.Rootfrombits-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
refbindableHTMLElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
Collapsible.Triggerfrombits-uiexceptchild
| 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
refbindableHTMLElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
Collapsible.Contentfrombits-uiexceptchild
| 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
refbindableHTMLSpanElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLSpanElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLSpanElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements | |