BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/agent-elements/generic-tool

generic-tool

agent-elements/generic-tool
FreeComponent

agent-elements publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by agent-elements on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://agent-elements.21st.dev/r/generic-tool.json

Source

registry/agent-elements/components/tools/generic-tool.tsxagent-elements.21st.dev/r/generic-tool.json
1import React, { memo } from "react";
2import type { TimelineStep, StepState } from "../types/timeline";
3import { useToolComplete } from "../hooks/use-tool-complete";
4import { ToolRowBase } from "./tool-row-base";
5
6export type GenericToolRowProps = {
7 step: Extract<TimelineStep, { type: "tool-call" }>;
8 state: StepState;
9 onComplete: () => void;
10};
11
12export function GenericToolRow({
13 step,
14 state,
15 onComplete,
16}: GenericToolRowProps) {
17 useToolComplete(state === "animating", step.duration, onComplete);
18 const isPending = state === "animating";
19
20 return (
21 <ToolRowBase
22 shimmerLabel={step.toolName}
23 completeLabel={step.toolName}
24 isAnimating={isPending}
25 detail={step.toolDetail}
26 />
27 );
28}
29
30export type GenericToolProps = {
31 icon?: React.ComponentType<{ className?: string }>;
32 title: string;
33 subtitle?: string;
34 isPending: boolean;
35 isError?: boolean;
36};
37
38export const GenericTool = memo(function GenericTool({
39 icon,
40 title,
41 subtitle,
42 isPending,
43}: GenericToolProps) {
44 const Icon = icon;
45
46 return (
47 <ToolRowBase
48 icon={
49 Icon ? (
50 <Icon className="w-full h-full shrink-0 text-muted-foreground" />
51 ) : undefined
52 }
53 shimmerLabel={title}
54 completeLabel={title}
55 isAnimating={isPending}
56 detail={subtitle}
57 />
58 );
59});

Facts

Registry
agent-elements
Type
registry:ui
Access
Free
Files written
0
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on agent-elements agent-elements.21st.dev Raw registry item This item as JSON

More from agent-elements

All 25 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
agent-chatagent-chatagent-elementsComponentsFreeno deps
attachment-buttonattachment-buttonagent-elementsComponentsFreeno deps
bash-toolbash-toolagent-elementsComponentsFreeno deps
edit-tooledit-toolagent-elementsComponentsFreeno deps
error-messageerror-messageagent-elementsComponentsFreeno deps
file-attachmentfile-attachmentagent-elementsComponentsFreeno deps
input-barinput-baragent-elementsComponentsFreeno deps
markdownmarkdownagent-elementsComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex