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.
Loading preview…
Installation
npm i zjkm-ui-ai-elementsimport { QueueItem, QueueItemIndicator, QueueItemContent, QueueItemDescription, QueueItemActions, QueueItemAction, QueueItemAttachment, QueueItemImage, QueueItemFile, QueueList, QueueSection, QueueSectionTrigger, QueueSectionLabel, QueueSectionContent, Queue,} from "zjkm-ui-ai-elements/queue";First time? Add the package's styles: see Setup.
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
Loading preview…
Props
<Queue />
Prop
Type
<QueueSection />
Prop
Type
<QueueSectionTrigger />
Prop
Type
<QueueSectionLabel />
Prop
Type
<QueueSectionContent />
Prop
Type
<QueueList />
Prop
Type
<QueueItem />
Prop
Type
<QueueItemIndicator />
Prop
Type
<QueueItemContent />
Prop
Type
<QueueItemDescription />
Prop
Type
<QueueItemActions />
Prop
Type
<QueueItemAction />
Prop
Type
<QueueItemAttachment />
Prop
Type
<QueueItemImage />
Prop
Type
<QueueItemFile />
Prop
Type
Type Exports
QueueMessagePart
Interface for message parts within queue messages.
interface QueueMessagePart {
type: string;
text?: string;
url?: string;
filename?: string;
mediaType?: string;
}QueueMessage
Interface for queue message items.
interface QueueMessage {
id: string;
parts: QueueMessagePart[];
}QueueTodo
Interface for todo items in the queue.
interface QueueTodo {
id: string;
title: string;
description?: string;
status?: "pending" | "completed";
}