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.

Install using CLI

AI Elements Vue
shadcn-vue CLI
npx ai-elements-vue@latest add queue

Install Manually

Copy and paste the following code in the same folder.

Queue.vue
QueueSection.vue
QueueSectionTrigger.vue
QueueSectionLabel.vue
QueueSectionContent.vue
QueueList.vue
QueueItem.vue
QueueItemIndicator.vue
QueueItemContent.vue
QueueItemDescription.vue
QueueItemActions.vue
QueueItemAction.vue
QueueItemAttachment.vue
QueueItemImage.vue
QueueItemFile.vue
index.ts
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@repo/shadcn-vue/lib/utils'

const props = defineProps<{
  class?: HTMLAttributes['class']
}>()
</script>

<template>
  <div
    :class="
      cn(
        'flex flex-col gap-2 rounded-xl border border-border bg-background px-3 pt-2 pb-2 shadow-xs',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>

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 Custom Label Icon

With PromptInput

Props

<Queue />

classstring
Additional classes applied to the component.

<QueueSection />

defaultOpenboolean
true
Whether the section is open by default.
classstring
''
Additional classes applied to the component.

<QueueSectionTrigger />

classstring
''
Additional classes applied to the component.

<QueueSectionLabel />

labelstring
The label text to display.
countnumber
The count to display before the label.
classstring
''
Additional classes applied to the label.

<QueueSectionContent />

classstring
''
Additional classes applied to the component.

<QueueList />

classstring
''
Additional classes applied to the component.

<QueueItem />

classstring
''
Additional classes applied to the component.

<QueueItemIndicator />

completedboolean
false
Whether the item is completed. Affects the indicator styling. Defaults to false.
classstring
''
Additional classes applied to the component.

<QueueItemContent />

completedboolean
false
Whether the item is completed. Affects text styling with strikethrough and opacity. Defaults to false.
classstring
''
Additional classes applied to the component.

<QueueItemDescription />

completedboolean
false
Whether the item is completed. Affects text styling. Defaults to false.
classstring
''
Additional classes applied to the component.

<QueueItemActions />

classstring
''
Additional classes applied to the component.

<QueueItemAction />

classstring
''
Additional classes applied to the component.

<QueueItemAttachment />

classstring
''
Additional classes applied to the component.

<QueueItemImage />

classstring
''
Additional classes applied to the component.

<QueueItemFile />

classstring
''
Additional classes applied to the component.