• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
drewmcdonald

drewmcdonald

promptCompare

Public
Like
promptCompare
Home
Code
7
.claude
3
backend
2
docs
1
frontend
4
shared
.mcp.json
deno.json
Environment variables
2
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
.claude
/
skills
/
ai-elements
/
references
/
queue.md
Code
/
.claude
/
skills
/
ai-elements
/
references
/
queue.md
Search
…
Viewing readonly version of main branch: v149
View latest version
queue.md

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

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 />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the root div.

<QueueSection />

PropTypeDefaultDescription
defaultOpenbooleantrueWhether the section is open by default.
...propsReact.ComponentProps<typeof Collapsible>-Any other props are spread to the Collapsible component.

<QueueSectionTrigger />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the button element.

<QueueSectionLabel />

PropTypeDefaultDescription
labelstring-The label text to display.
countnumber-The count to display before the label.
iconReact.ReactNode-An optional icon to display before the count.
...propsReact.ComponentProps<-Any other props are spread to the span element.

<QueueSectionContent />

PropTypeDefaultDescription
...propsReact.ComponentProps<typeof CollapsibleContent>-Any other props are spread to the CollapsibleContent component.

<QueueList />

PropTypeDefaultDescription
...propsReact.ComponentProps<typeof ScrollArea>-Any other props are spread to the ScrollArea component.

<QueueItem />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the li element.

<QueueItemIndicator />

PropTypeDefaultDescription
completedbooleanfalseWhether the item is completed. Affects the indicator styling.
...propsReact.ComponentProps<-Any other props are spread to the span element.

<QueueItemContent />

PropTypeDefaultDescription
completedbooleanfalseWhether the item is completed. Affects text styling with strikethrough and opacity.
...propsReact.ComponentProps<-Any other props are spread to the span element.

<QueueItemDescription />

PropTypeDefaultDescription
completedbooleanfalseWhether the item is completed. Affects text styling.
...propsReact.ComponentProps<-Any other props are spread to the div element.

<QueueItemActions />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the div element.

<QueueItemAction />

PropTypeDefaultDescription
...propsOmit<React.ComponentProps<typeof Button>,-Any other props (except variant and size) are spread to the Button component.

<QueueItemAttachment />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the div element.

<QueueItemImage />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the img element.

<QueueItemFile />

PropTypeDefaultDescription
...propsReact.ComponentProps<-Any other props are spread to the span element.

Type Exports

QueueMessagePart

Interface for message parts within queue messages.

Create val
interface QueueMessagePart { type: string; text?: string; url?: string; filename?: string; mediaType?: string; }

QueueMessage

Interface for queue message items.

Create val
interface QueueMessage { id: string; parts: QueueMessagePart[]; }

QueueTodo

Interface for todo items in the queue.

Create val
interface QueueTodo { id: string; title: string; description?: string; status?: "pending" | "completed"; }
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.