Serafim

Tool Group

AI chats 129

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.8K
  • Testimonials with Marquee

    Testimonials with Marquee

    2.5K
  • Gradient Button

    Gradient Button

    2.1K
  • Pixel Canvas

    Pixel Canvas

    934
  • Animated Blur Number

    Animated Blur Number

    840
  • Empty State

    Empty State

    809
  • Balloons

    Balloons

    802
  • Status Badge

    Status Badge

    699

More in AI chats

View all
  • AI Actions

    AI Actions

    361
  • Aquarium Prompt

    Aquarium Prompt

    158
  • Color Picker

    Color Picker

    224
  • AI Task List

    AI Task List

    198
  • Interactive LLM Token & Context Window Visualizer

    Interactive LLM Token & Context Window Visualizer

    2
  • AI Orb

    AI Orb

    211
  • Message

    Message

    53
  • Commit

    Commit

    43