Ai Elements
CLAWHUB · Unverified
Vercel AI Elements for workflow UI components. Use when building chat interfaces, displaying tool execution, showing reasoning/thinking, or creating job queu... Skill: Ai Elements Owner: anderskev Summary: Vercel AI Elements for workflow UI components. Use when building chat interfaces, displaying tool execution, showing reasoning/thinking, or creating job queu... Tags: latest:1.1.1 Version history: v1.1.1 | 2026-04-22T04:14:46.356Z | auto - Added a new "Gates" section to clarify setup steps before using AI Elements, including per-component installation, import path verifica
- 62
- Rank
- 84
- Safety
- 992
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 992 downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 11, 2026
- Adoption signal
- 992 downloadsadoption · Oct 11, 2026
- Latest release
- 1.1.1release · Apr 22, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.1.1release
- Added a new "Gates" section to clarify setup steps before using AI Elements, including per-component installation, import path verification, and state matching requirements. - No changes to library API or components; this update improves documentation accuracy and reliability for initial integration. - Other documentation content remains unchanged.
Observed Apr 22, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s17b1fzefm8nj8j1sdkzrze7gn83pfrg:ai-elements- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-anderskev-ai-elements/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
142,291 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: ai-elements
description: Vercel AI Elements for workflow UI components. Use when building chat interfaces, displaying tool execution, showing reasoning/thinking, or creating job queues. Triggers on ai-elements, Queue, Confirmation, Tool, Reasoning, Shimmer, Loader, Message, Conversation, PromptInput.
---
# AI Elements
AI Elements is a comprehensive React component library for building AI-powered user interfaces. The library provides 30+ components specifically designed for chat interfaces, tool execution visualization, reasoning displays, and workflow management.
## Installation
Install via shadcn registry:
```bash
npx shadcn@latest add https://ai-elements.vercel.app/r/[component-name]
```
**Import Pattern**: Components are imported from individual files, not a barrel export:
```tsx
// Correct - import from specific files
import { Conversation } from "@/components/ai-elements/conversation";
import { Message } from "@/components/ai-elements/message";
import { PromptInput } from "@/components/ai-elements/prompt-input";
// Incorrect - no barrel export
import { Conversation, Message } from "@/components/ai-elements";
```
## Gates (before relying on examples)
Use this sequence when adding or wiring AI Elements so setup is checkable, not assumed.
1. **Install each component** — Run `npx shadcn@latest add https://ai-elements.vercel.app/r/[component-name]` for every component you need.
- **Pass:** The command completes successfully and a file for that component exists under your project’s `components/ai-elements/` (or the directory `components.json` uses for those additions).
2. **Align import paths** — Every `import … from "@/components/ai-elements/..."` must match your repo’s actual alias and folder layout.
- **Pass:** Each import resolves to a file on disk (IDE navigation or build/`tsc` shows no “cannot find module” for those paths).
3. **Match `Tool` / `Confirmation` states to your AI SDK** — State strings (including approval-related states) depend on the installed `ai` package major/version.
- **Pass:** The states you pass to `ToolHeader`, `Tool`, or `Confirmation` are listed in the AI SDK version you have installed (docs or exported types), not copied from memory alone.
## Component Categories
### Conversation Components
Components for displaying chat-style interfaces with messages, attachments, and auto-scrolling behavior.
- **Conversation**: Container with auto-scroll capabilities
- **Message**: Individual message display with role-based styling
- **MessageAttachment**: File and image attachments
- **MessageBranch**: Alternative response navigation
See [references/conversation.md](references/conversation.md) for details.
### Prompt Input Components
Advanced text input with file attachments, drag-and-drop, speech input, and state management.
- **PromptInput**: Form container with file handling
- **PromptInputTextarea**: Auto-expanding textarea
- **PromptInputSubmit**: Status-aware submit button
- **PromptInput_meta.json
{
"ownerId": "kn79190nfmdb20hk6xjhzt2zv583844x",
"slug": "ai-elements",
"version": "1.1.1",
"publishedAt": 1776831286356
}references/conversation.md
# Conversation Components
Components for building chat-style interfaces with messages, attachments, and intelligent auto-scrolling.
## Core Components
### Conversation
Container component that wraps the entire conversation area with auto-scroll functionality.
```typescript
type ConversationProps = ComponentProps<typeof StickToBottom>;
```
**Props:**
- `className?: string` - Additional CSS classes
- `initial?: "smooth" | "auto"` - Initial scroll behavior (default: "smooth")
- `resize?: "smooth" | "auto"` - Scroll behavior on resize (default: "smooth")
**Usage:**
```tsx
<Conversation className="flex-1 overflow-y-hidden">
<ConversationContent>
{/* Messages go here */}
</ConversationContent>
<ConversationScrollButton />
</Conversation>
```
**Features:**
- Uses `use-stick-to-bottom` for intelligent scrolling
- Automatically scrolls to bottom when new messages arrive
- Pauses auto-scroll when user scrolls up manually
- Provides context for scroll state to child components
- Sets `role="log"` for accessibility
### ConversationContent
Content area for messages within the conversation.
```typescript
type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;
```
**Usage:**
```tsx
<ConversationContent className="flex flex-col gap-8 p-4">
{messages.map(message => (
<Message key={message.id} from={message.role}>
{/* Message content */}
</Message>
))}
</ConversationContent>
```
**Default Styling:**
- Flexbox column layout with gap
- Padding for content separation
### ConversationEmptyState
Placeholder shown when there are no messages.
```typescript
type ConversationEmptyStateProps = ComponentProps<"div"> & {
title?: string;
description?: string;
icon?: React.ReactNode;
};
```
**Props:**
- `title?: string` - Heading text (default: "No messages yet")
- `description?: string` - Descriptive text (default: "Start a conversation to see messages here")
- `icon?: React.ReactNode` - Icon to display above text
- `children?: React.ReactNode` - Custom content (overrides default)
**Usage:**
```tsx
{messages.length === 0 ? (
<ConversationEmptyState
title="Welcome!"
description="Ask me anything to get started"
icon={<MessageSquareIcon className="size-12" />}
/>
) : (
<ConversationContent>
{/* Messages */}
</ConversationContent>
)}
```
### ConversationScrollButton
Button that appears when user is not at the bottom of the conversation, allowing quick navigation to latest messages.
```typescript
type ConversationScrollButtonProps = ComponentProps<typeof Button>;
```
**Usage:**
```tsx
<Conversation>
<ConversationContent>
{/* Messages */}
</ConversationContent>
<ConversationScrollButton />
</Conversation>
```
**Behavior:**
- Only visible when `isAtBottom` is false
- Positioned at bottom center of conversation
- Calls `scrollToBottom()` on click
- Uses `ArrowDownIcon` by default
## Message Components
### Message
Container for an individual message with role-based streferences/prompt-input.md
# Prompt Input Components
Advanced text input components with file attachments, drag-and-drop, speech input, and comprehensive state management.
## Table of Contents
- [Core Components](#core-components)
- [State Management](#state-management)
- [Attachment Handling](#attachment-handling)
- [Action Menus](#action-menus)
- [Submit Button](#submit-button)
- [Speech Input](#speech-input)
- [Advanced Features](#advanced-features)
- [Complete Example](#complete-example)
## Core Components
### PromptInput
Main form container that handles text input, file attachments, and submission.
```typescript
type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, "onSubmit" | "onError"> & {
accept?: string;
multiple?: boolean;
globalDrop?: boolean;
syncHiddenInput?: boolean;
maxFiles?: number;
maxFileSize?: number;
onError?: (err: { code: "max_files" | "max_file_size" | "accept"; message: string }) => void;
onSubmit: (message: PromptInputMessage, event: FormEvent<HTMLFormElement>) => void | Promise<void>;
};
type PromptInputMessage = {
text: string;
files: FileUIPart[];
};
```
**Props:**
- `accept?: string` - File type filter (e.g., "image/*")
- `multiple?: boolean` - Allow multiple file selection
- `globalDrop?: boolean` - Accept drops anywhere on document (default: false)
- `syncHiddenInput?: boolean` - Keep hidden input in sync (default: false)
- `maxFiles?: number` - Maximum number of files
- `maxFileSize?: number` - Maximum file size in bytes
- `onError?: (err) => void` - Error handler for file validation
- `onSubmit: (message, event) => void | Promise<void>` - Submit handler (required)
**Usage:**
```tsx
<PromptInput
accept="image/*"
multiple
maxFiles={5}
maxFileSize={10 * 1024 * 1024} // 10MB
onError={(err) => toast.error(err.message)}
onSubmit={async (message) => {
await sendMessage(message.text, message.files);
}}
>
<PromptInputAttachments>
{(attachment) => <PromptInputAttachment data={attachment} />}
</PromptInputAttachments>
<PromptInputBody>
<PromptInputTextarea placeholder="Type a message..." />
</PromptInputBody>
<PromptInputFooter>
<PromptInputTools>
<PromptInputButton onClick={() => attachments.openFileDialog()}>
<PaperclipIcon />
</PromptInputButton>
</PromptInputTools>
<PromptInputSubmit status={chatStatus} />
</PromptInputFooter>
</PromptInput>
```
**Features:**
- Dual-mode operation (controlled/uncontrolled)
- Drag-and-drop file handling (local or global)
- Paste image/file support
- File validation (type, size, count)
- Automatic blob URL to data URL conversion
- Async/sync onSubmit support
- Auto-reset on successful submission
### PromptInputBody
Container for the main input area.
```typescript
type PromptInputBodyProps = HTMLAttributes<HTMLDivElement>;
```
**Usage:**
```tsx
<PromptInputBody>
<PromptInputTextarea />
</PromptInputBody>
```
### PromptInputTextarea
Auto-expanding textarea with keyboard shortcuts and paste handlinreferences/visualization.md
# Visualization Components
ReactFlow-based components for workflow visualization, custom nodes, and animated edges.
## Core Components
### Canvas
ReactFlow wrapper with aviation-specific defaults and background.
```typescript
type CanvasProps = ReactFlowProps & {
children?: ReactNode;
};
```
**Usage:**
```tsx
import { Canvas } from "@/components/ai-elements/canvas";
import { Background, Controls, Panel } from "@xyflow/react";
import "@xyflow/react/dist/style.css";
<Canvas
nodes={nodes}
edges={edges}
nodeTypes={nodeTypes}
edgeTypes={edgeTypes}
onNodesChange={onNodesChange}
onEdgesChange={onEdgesChange}
>
<Background bgColor="var(--sidebar)" />
<Controls />
<Panel position="top-left">
<h3>Workflow</h3>
</Panel>
</Canvas>
```
**Default Props:**
- `deleteKeyCode: ["Backspace", "Delete"]` - Keys to delete selected elements
- `fitView: true` - Automatically fit content in viewport
- `panOnDrag: false` - Disable pan on drag (use selection instead)
- `panOnScroll: true` - Enable pan on scroll
- `selectionOnDrag: true` - Enable selection box on drag
- `zoomOnDoubleClick: false` - Disable zoom on double click
**Features:**
- Includes Background component with sidebar color
- Accepts all ReactFlow props
- Optimized for workflow visualization
## Node Components
Custom node components built on shadcn/ui Card components.
### Node
Main node container with connection handles.
```typescript
type NodeProps = ComponentProps<typeof Card> & {
handles: {
target: boolean;
source: boolean;
};
};
```
**Props:**
- `handles: { target: boolean; source: boolean }` - Which handles to show (required)
- All Card component props
**Usage:**
```tsx
<Node handles={{ target: true, source: true }}>
<NodeHeader>
<NodeTitle>Process Data</NodeTitle>
<NodeDescription>Transform input data</NodeDescription>
</NodeHeader>
<NodeContent>
{/* Node content */}
</NodeContent>
<NodeFooter>
Status: Running
</NodeFooter>
</Node>
```
**Handle Positions:**
- Target: Left side (incoming connections)
- Source: Right side (outgoing connections)
**Default Styling:**
- Relative positioning for handles
- Auto height
- Fixed width (w-sm)
- Rounded corners
### NodeHeader
Header section with border bottom and secondary background.
```typescript
type NodeHeaderProps = ComponentProps<typeof CardHeader>;
```
**Usage:**
```tsx
<NodeHeader>
<NodeTitle>Step 1</NodeTitle>
<NodeDescription>Initial processing</NodeDescription>
<NodeAction onClick={handleEdit}>
<EditIcon />
</NodeAction>
</NodeHeader>
```
**Default Styling:**
- Rounded top corners
- Border bottom
- Secondary background
- Compact padding (p-3)
### NodeTitle
Title text for node header.
```typescript
type NodeTitleProps = ComponentProps<typeof CardTitle>;
```
**Usage:**
```tsx
<NodeTitle>Data Processing</NodeTitle>
```
### NodeDescription
Secondary description text.
```typescript
type NodeDescriptionProps = ComponentProps<typeof CardDescription>AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-anderskev-ai-elements. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about Ai Elements. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-anderskev-ai-elements, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"label": "Vendor",
"value": "Clawhub",
"category": "vendor",
"href": "https://clawhub.ai/anderskev/skills/ai-elements",
"sourceUrl": "https://clawhub.ai/anderskev/skills/ai-elements",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T21:14:53.626Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "protocols",
"label": "Protocol compatibility",
"value": "OpenClaw",
"category": "compatibility",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-anderskev-ai-elements/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-anderskev-ai-elements/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T21:14:53.626Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "traction",
"label": "Adoption signal",
"value": "992 downloads",
"category": "adoption",
"href": "https://clawhub.ai/anderskev/ai-elements",
"sourceUrl": "https://clawhub.ai/anderskev/ai-elements",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T21:14:53.626Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "latest_release",
"label": "Latest release",
"value": "1.1.1",
"category": "release",
"href": "https://clawhub.ai/anderskev/ai-elements",
"sourceUrl": "https://clawhub.ai/anderskev/ai-elements",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-22T04:14:46.356Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "handshake_status",
"label": "Handshake status",
"value": "UNKNOWN",
"category": "security",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-anderskev-ai-elements/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-anderskev-ai-elements/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true,
"metadata": {}
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.1.1",
"description": "- Added a new \"Gates\" section to clarify setup steps before using AI Elements, including per-component installation, import path verification, and state matching requirements. - No changes to library API or components; this update improves documentation accuracy and reliability for initial integration. - Other documentation content remains unchanged.",
"href": "https://clawhub.ai/anderskev/ai-elements",
"sourceUrl": "https://clawhub.ai/anderskev/ai-elements",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-22T04:14:46.356Z",
"isPublic": true,
"metadata": {}
}
]
}Record generated Nov 23, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-anderskev-ai-elements/run-check
