Rendyn

Component library

189 components

Agent UI

Tool Result

Tool Result separates tool identity, status and expandable output.

React Tailwind CSS

Practical React example

Present the output and final state of a tool invocation beside the task that requested it.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/agents/tool-result.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, shiki, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Present the output and final state of a tool invocation beside the task that requested it

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
'use client';

import { ToolResult, ToolResultOutput } from '@/components/agents/tool-result';

export function RecordedBuildResult({ output, succeeded }: { output: string; succeeded: boolean }) {
  return (
    <ToolResult tool="build" title="Recorded build output" kind="terminal" status={succeeded ? 'success' : 'error'}>
      <ToolResultOutput language="bash">{output}</ToolResultOutput>
    </ToolResult>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Drive running, success, error and cancelled from the actual invocation. If retry is offered, bind it to the original operation and reconcile uncertain outcomes.

Customization

ToolResultProps.tool
Required; ReactNode.
ToolResultProps.title
Required; ReactNode.
ToolResultProps.children
Required; ReactNode.
ToolResultProps.status
Optional; ToolResultStatus.
ToolResultProps.kind
Optional; ToolResultKind.
ToolResultProps.meta
Optional; ReactNode.
ToolResultProps.icon
Optional; ReactNode.
ToolResultProps.open
Optional; boolean.
ToolResultProps.defaultOpen
Optional; boolean.
ToolResultProps.onOpenChange
Optional; (open: boolean) => void.
ToolResultProps.collapseOnComplete
Optional; boolean.
ToolResultProps.maxHeight
Optional; number.
ToolResultProps.copyText
Optional; string.
ToolResultProps.onCopy
Optional; () => void | Promise<void>.

Integration notes

  • Redact credentials and private data before putting raw logs in the UI or clipboard.
  • A successful tool process is not necessarily a successful user workflow; show the relevant result.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP