Tool Chips
ProNewCompact tool-call and code-edit chips with live status spinners, +/- diff counters, and click-to-expand traces.
Installation
pnpm dlx shadcn@latest add @viewport/tool-chips
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| calls* | ToolCallItem[]Tool calls to render as compact interactive chips. | — |
| summary | stringSummary headline shown above the chip row, e.g. "4 tool calls, 2 edits". | — |
| expandable | booleanAllow clicking a chip with `detail` to inspect its output inline. | true |
| className | string | — |
Accessibility
- Expandable chips are buttons with aria-expanded; non-expandable chips stay non-interactive.
- Every chip announces its state (Running, Completed, Failed) to screen readers.
- Shimmer and spring entrance stop under reduced motion.