Skip to content
AI Elements

Tool

Server Component

Collapsible tool-call panel with input, output, and status.

Import

tsx
import { Tool } from "@cronus-ui/ui";
bash
npx cronus-ui add tool

Examples

API Reference

Generated from the component's exported types.

ToolLabels

Skip ToolLabels props table
PropTypeDefaultDescription
pending
string
running
string
completed
string
error
string
parameters
string
result
string
errorHeading
string

ToolProps

Extends ComponentProps<typeof Collapsible>

No own props — see the extended type above for available props.

ToolHeaderProps

Extends HTMLAttributes<HTMLButtonElement>

Skip ToolHeaderProps props table
PropTypeDefaultDescription
title
string
type*
ToolUIPart["type"]
state*
ToolUIPart["state"]
labels
ToolLabelsOverride default English strings.

ToolContentProps

Extends ComponentProps<typeof CollapsibleContent>

No own props — see the extended type above for available props.

ToolInputProps

Extends HTMLAttributes<HTMLDivElement>

Skip ToolInputProps props table
PropTypeDefaultDescription
input*
ToolUIPart["input"]
labels
Pick<ToolLabels, "parameters">Override default English strings.

ToolOutputProps

Extends HTMLAttributes<HTMLDivElement>

Skip ToolOutputProps props table
PropTypeDefaultDescription
output*
ToolUIPart["output"]
errorText
ToolUIPart["errorText"]
labels
Pick<ToolLabels, "result" | "errorHeading">Override default English strings.