Queue

Queue and manage pending prompts while the model is still responding.

Queue is a presentational shell for pending prompts and todos. Own the arrays in your app, then compose sections, list rows, and hover actions.

  • Summarize the cutover checklist for production.
  • Draft a rollback note for the billing migrate.
    rollback.mddiagram.png
  • List monitors to watch for the first hour after deploy.
  • Review smoke tests
    Auth, checkout, and billing paths
  • Confirm migration window
    Ops channel + on-call
  • Prepare status update

Installation

pnpm dlx cubix@latest add queue

Usage

Import
import {
  Queue,
  QueueItem,
  QueueItemAction,
  QueueItemActions,
  QueueItemContent,
  QueueItemIndicator,
  QueueItemRow,
  QueueList,
  QueueSection,
  QueueSectionContent,
  QueueSectionLabel,
  QueueSectionTrigger,
} from "@/components/cubix/queue"
Example
<Queue>
  <QueueSection>
    <QueueSectionTrigger>
      <QueueSectionLabel count={messages.length} label="Queued" />
    </QueueSectionTrigger>
    <QueueSectionContent>
      <QueueList>
        {messages.map((message) => (
          <QueueItem key={message.id}>
            <QueueItemRow>
              <QueueItemIndicator />
              <QueueItemContent>{summary}</QueueItemContent>
              <QueueItemActions>
                <QueueItemAction aria-label="Remove">...</QueueItemAction>
              </QueueItemActions>
            </QueueItemRow>
          </QueueItem>
        ))}
      </QueueList>
    </QueueSectionContent>
  </QueueSection>
</Queue>

Composition

 
Queue
└── QueueSection
    ├── QueueSectionTrigger
       └── QueueSectionLabel
    └── QueueSectionContent
        └── QueueList
            └── QueueItem
                ├── QueueItemRow
                   ├── QueueItemIndicator
                   ├── QueueItemContent
                   └── QueueItemActions
                       └── QueueItemAction
                ├── QueueItemDescription
                └── QueueItemAttachment
                    ├── QueueItemImage
                    └── QueueItemFile

Features

  • Collapsible Queued and Todo sections
  • Pending and completed item states
  • Attachments, hover actions, and Prompt Input pairing

Messages

  • Summarize the cutover checklist for production.
  • Draft a rollback note for the billing migrate.

Todos

  • Review smoke tests
    Auth, checkout, and billing paths
  • Confirm migration window
    Ops channel + on-call
  • Prepare status update

Collapsed

Attachments

  • Draft a rollback note for the billing migrate.
    rollback.mddiagram.png

Empty

No pending prompts right now.

With Prompt Input

  • Summarize the cutover checklist for production.
  • Draft a rollback note for the billing migrate.

API Reference

Queue

PropTypeDefaultDescription
classNamestring-Optional styles for the queue card shell.

QueueSection

PropTypeDefaultDescription
defaultOpenbooleantrueInitial open state for the section.
openboolean-Controlled open state.
onOpenChange(open: boolean) => void-Called when the section opens or closes.

QueueSectionLabel

PropTypeDefaultDescription
labelstring-Section label text, e.g. Queued or Todo.
countnumber-Optional count shown before the label.
iconReact.ReactNode-Optional leading icon beside the label.

QueueItemIndicator

PropTypeDefaultDescription
completedbooleanfalseFilled muted dot for completed items.

QueueItemContent

PropTypeDefaultDescription
completedbooleanfalseApplies muted strikethrough styling.