Edu Calvo

AI Tool Call

AI chats 52

About

Agent tool-call card that stays collapsed while running and expands to its arguments and result, with success, running and error states. Respects prefers-reduced-motion.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Tool Call to your project and fits it to your theme.

Code

How AI Tool Call is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import Component from "@/components/ui/ai-tool-call";

export default function DemoOne() {
  return (
    <div className="flex min-h-[420px] w-full items-center justify-center bg-background p-10">
      <div className="w-full max-w-lg space-y-3">
        <Component
          args={<code>{'{ "query": "spring physics easing" }'}</code>}
          defaultOpen
          name="search_web"
          result={
            <ul className="space-y-1">
              <li>motion.dev — Spring options</li>
              <li>developer.mozilla.org — easing-function</li>
              <li>web.dev — Animations guide</li>
            </ul>
          }
          status="success"
          summary="3 results"
        />
        <Component name="read_file" status="running" summary="src/app/page.tsx" />
        <Component
          name="run_tests"
          result={<span>2 of 48 suites failed.</span>}
          status="error"
          summary="failed"
        />
      </div>
    </div>
  );
}

Dependencies

More by Edu Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    235
  • AI Task List

    AI Task List

    160
  • Siri Orb

    Siri Orb

    160
  • Cursor Follow

    Cursor Follow

    154
  • Pixel Flow Field

    Pixel Flow Field

    143
  • Agent Avatar

    Agent Avatar

    130
  • Gravity Stars

    Gravity Stars

    112
  • Coverflow Carousel

    Coverflow Carousel

    95

More in AI chats

View all
  • AI Actions

    AI Actions

    319
  • Color Picker

    Color Picker

    82
  • Agent Chat

    Agent Chat

    17
  • Prompt with Model Picker

    Prompt with Model Picker

    2
  • System Message

    System Message

    54
  • Message Thread

    Message Thread

    36
  • Suggestions

    Suggestions

    28
  • Message With Header And Delivery Status

    Message With Header And Delivery Status

    38