Documentation Index
Fetch the complete documentation index at: https://mintlify.com/omavashia2005/ai-tool-elements/llms.txt
Use this file to discover all available pages before exploring further.
ToolCard is a generic React component that renders a tool or connector as a styled card. It accepts a tool prop plus optional actions, footer, and any props the underlying Card div accepts. The component displays the connector’s logo, name, description, and configuration fields automatically from the shape of the tool object.
Signature
Type Definition
Props
The connector data to display. All visual content — logo, name, description, and configuration fields — is derived from this object. Must satisfy the
Tool type at minimum, but can be any supertype when the component is used with an explicit type parameter.Content rendered in the card’s top-right action slot, inline with the connector name. Useful for interactive controls such as a Connect or Disconnect button, an Active badge, or a toggle switch.
Content rendered in the card footer, below a top border that visually separates it from the main card body. Useful for metadata rows, last-sync timestamps, account identifiers, or secondary links.
Additional CSS class names passed to the underlying Card
div. Merged with the component’s own classes. Inherited from ComponentProps<typeof Card>.Any prop accepted by the underlying shadcn
Card component is forwarded directly to it. This includes all standard div HTML attributes: data-* attributes, aria-* accessibility attributes, event handlers such as onClick, inline style, and id.Examples
Generic Typing
ToolCard is fully generic over any type T that extends Tool. This means you can pass a richer subtype as the tool prop and TypeScript will track the additional properties through the component tree — for instance, accessing them inside actions or footer without a type cast.