laguagu/claude-code-nextjs-skills / skills/ai-elements
ai-elements
VerifiedMaintains AI chat UI built from elements.ai-sdk.dev AI Elements components already copied into the project. Use when changing or debugging those components (conversations, messages, prompt inputs, attachments, reasoning, tool output, sources). New chat UI uses the shadcn/ui AI Elements patterns (`shadcn` skill).
references/queue.md
View on GitHub# Queue
A comprehensive queue component system for displaying message lists, todos, and collapsible task sections in AI applications.
The `Queue` component provides a flexible system for displaying lists of messages, todos, attachments, and collapsible sections. Perfect for showing AI workflow progress, pending tasks, message history, or any structured list of items in your application.
See `scripts/queue.tsx` for this example.
## Installation
```bash
npx ai-elements@latest add queue
```
## Features
- Flexible component system with composable parts
- Collapsible sections with smooth animations
- Support for completed/pending state indicators
- Built-in scroll area for long lists
- Attachment display with images and file indicators
- Hover-revealed action buttons for queue items
- TypeScript support with comprehensive type definitions
- Customizable styling with Tailwind CSS
- Responsive design with mobile-friendly interactions
- Keyboard navigation and accessibility support
- Theme-aware with automatic dark mode support
## Examples
### With PromptInput
See `scripts/queue-prompt-input.tsx` for this example.
## Props
### `<Queue />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the root div. |
### `<QueueSection />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `defaultOpen` | `boolean` | `true` | Whether the section is open by default. |
| `...props` | `React.ComponentProps<typeof Collapsible>` | - | Any other props are spread to the Collapsible component. |
### `<QueueSectionTrigger />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the button element. |
### `<QueueSectionLabel />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `label` | `string` | - | The label text to display. |
| `count` | `number` | - | The count to display before the label. |
| `icon` | `React.ReactNode` | - | An optional icon to display before the count. |
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the span element. |
### `<QueueSectionContent />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<typeof CollapsibleContent>` | - | Any other props are spread to the CollapsibleContent component. |
### `<QueueList />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<typeof ScrollArea>` | - | Any other props are spread to the ScrollArea component. |
### `<QueueItem />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the li element. |
### `<QueueItemIndicator />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `completed` | `boolean` | `false` | Whether the item is completed. Affects the indicator styling. |
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the span element. |
### `<QueueItemContent />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `completed` | `boolean` | `false` | Whether the item is completed. Affects text styling with strikethrough and opacity. |
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the span element. |
### `<QueueItemDescription />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `completed` | `boolean` | `false` | Whether the item is completed. Affects text styling. |
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the div element. |
### `<QueueItemActions />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the div element. |
### `<QueueItemAction />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `Omit<React.ComponentProps<typeof Button>, ` | - | Any other props (except variant and size) are spread to the Button component. |
### `<QueueItemAttachment />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the div element. |
### `<QueueItemImage />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the img element. |
### `<QueueItemFile />`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `...props` | `React.ComponentProps<` | - | Any other props are spread to the span element. |
## Type Exports
### `QueueMessagePart`
Interface for message parts within queue messages.
```tsx
interface QueueMessagePart {
type: string;
text?: string;
url?: string;
filename?: string;
mediaType?: string;
}
```
### `QueueMessage`
Interface for queue message items.
```tsx
interface QueueMessage {
id: string;
parts: QueueMessagePart[];
}
```
### `QueueTodo`
Interface for todo items in the queue.
```tsx
interface QueueTodo {
id: string;
title: string;
description?: string;
status?: "pending" | "completed";
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |