Tool Result Panel

Tool result panel with the tool name, a success, error or running status badge and the output shown in a JSON code block. Built in React for AI agent UIs.

src/registry/ui/tool-result-panel.tsx/r/tool-result-panel.json

Installation#

bash
npx shadcn@latest add @minidev/tool-result-panel

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/tool-result-panel.json

Usage#

tsx
import { ToolResultPanel } from "@/components/ui/tool-result-panel"

export function Example() {
  return (
    <ToolResultPanel name="generate_hero" output={'{\n  "variant": "aurora",\n  "cta": ["Start free", "See Premium"]\n}'} />
  )
}

API reference#

ToolResultPanel props
PropTypeDefault
namestring"lookup_invoice"
status"success" | "error" | "running""success"
outputstringSAMPLE_OUTPUT
classNamestring-

Dependencies#

npm

React only

Examples#

All AI chat UI components for React