Serafim

Tool Group

AI chats 119

About

Collapsible header summarizing nested tool calls (files / searches / commands). State-driven (completed / pending streaming / interrupted) with shimmer label and elapsed time. Self-contained port from 21st.dev Agent Elements.

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

Code

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

Usage.tsx

"use client";

import { ToolGroup } from "@/components/ui/tool-group";

const nestedTools = [
  {
    category: "command" as const,
    title: "Bash",
    subtitle: "pnpm lint",
  },
  {
    category: "search" as const,
    title: "Grep",
    subtitle: "InputBar",
  },
  {
    category: "file" as const,
    title: "Read",
    subtitle: "/lib/agent-ui/components/input-bar.tsx",
  },
];

export default function Demo() {
  return (
    <div className="min-h-screen w-full flex items-center justify-center p-6 bg-white dark:bg-neutral-950">
      <div className="w-full max-w-[420px]">
        <ToolGroup
          state="completed"
          nestedTools={nestedTools}
          completeLabel="Task completed"
          shimmerLabel="Running task"
          interruptedLabel="Task interrupted"
          elapsedTime="6s"
          defaultOpen={false}
        />
      </div>
    </div>
  );
}

Dependencies

More by Serafim

View all
  • Spline Scene

    Spline Scene

    9.4K
  • Testimonials with Marquee

    Testimonials with Marquee

    2.3K
  • Gradient Button

    Gradient Button

    1.9K
  • Pixel Canvas

    Pixel Canvas

    899
  • Animated Blur Number

    Animated Blur Number

    830
  • Empty State

    Empty State

    773
  • Balloons

    Balloons

    753
  • Status Badge

    Status Badge

    639

More in AI chats

View all
  • AI Actions

    AI Actions

    317
  • Color Picker

    Color Picker

    73
  • Prompt with Model Picker

    Prompt with Model Picker

    2
  • Agent Chat

    Agent Chat

    17
  • Approval Card

    Approval Card

    12
  • System Message

    System Message

    53
  • Message

    Message

    48
  • AI Task List

    AI Task List

    159