ToolCall
Animated single or multi-step tool activity.
Install
npx shadcn@latest add https://crate.onerollstudios.com/r/tool-call.jsonPlayground
- Running searchDocs…
<ToolCall toolName="searchDocs" />Import
import { ToolCall } from "@/components/agent-wait-states/tool-call";Props
| Prop | Type | Required | Default | Notes |
|---|---|---|---|---|
className | string | no | ||
accent | boolean | no | false | |
labels | Partial<CrateLabels> | no | Replace any of this component's labels. Overrides CrateProvider. | |
steps | ToolStep[] | no | ||
toolName | string | no | ||
label | string | no | ||
done | boolean | no | false | The call has finished: every step shows as complete, and the default label says "Used". |
Labels
Override with the labels prop or a CrateProvider.
| Label | English default |
|---|---|
usedTool | (toolName) => `Used ${toolName}` |
usedToolUnnamed | "Used a tool" |
runningTool | (toolName) => `Running ${toolName}…` |
runningToolUnnamed | "Running a tool…" |
toolActivity | "Agent tool activity" |
Types
export type ToolStep = { id?: string; label: string; toolName?: string; state?: "pending" | "active" | "complete" };Example
<ToolCall steps={toolSteps} accent />For coding agents: /llms/tool-call.md, generated from the same source.