Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Queue
Grouped lists of queued and completed work.
- Add the ghost variant to Button
- Write a story for the new variant
import {
Queue,
QueueItem,
QueueItemAction,
QueueItemActions,
QueueItemContent,
QueueItemDescription,
QueueItemIndicator,
QueueList,
QueueSection,
QueueSectionContent,
QueueSectionLabel,
QueueSectionTrigger,
} from "@/registry/default/shared/queue";
const pending = [
{ id: "1", text: "Add the ghost variant to Button" },
{ id: "2", text: "Write a story for the new variant" },
];
const done = [{ id: "3", text: "Read the existing Button implementation" }];
export default function Particle() {
return (
<div className="w-full max-w-lg">
<Queue>
<QueueSection>
<QueueSectionTrigger>
<QueueSectionLabel count={pending.length} label="queued" />
</QueueSectionTrigger>
<QueueSectionContent>
<QueueList>
{pending.map((item) => (
<QueueItem key={item.id}>
<QueueItemIndicator />
<QueueItemContent>{item.text}</QueueItemContent>
<QueueItemActions>
<QueueItemAction>Remove</QueueItemAction>
</QueueItemActions>
</QueueItem>
))}
</QueueList>
</QueueSectionContent>
</QueueSection>
<QueueSection defaultOpen={false}>
<QueueSectionTrigger>
<QueueSectionLabel count={done.length} label="completed" />
</QueueSectionTrigger>
<QueueSectionContent>
<QueueList>
{done.map((item) => (
<QueueItem key={item.id}>
<QueueItemIndicator completed />
<QueueItemContent completed>{item.text}</QueueItemContent>
<QueueItemDescription completed>Finished a moment ago</QueueItemDescription>
</QueueItem>
))}
</QueueList>
</QueueSectionContent>
</QueueSection>
</Queue>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/queue
Usage
import {
QueueItem,
QueueItemIndicator,
QueueItemContent,
QueueItemDescription,
QueueItemActions,
QueueItemAction,
QueueItemAttachment,
QueueItemImage,
} from "@/components/queue";API Reference
| Export | Props |
|---|---|
QueueItem | <li> attributes |
QueueItemIndicator | <span> attributes, plus its own options |
QueueItemContent | <span> attributes, plus its own options |
QueueItemDescription | <div> attributes, plus its own options |
QueueItemActions | <div> attributes |
QueueItemAction | Button props, with some props omitted |
QueueItemAttachment | <div> attributes |
QueueItemImage | <img> attributes |
QueueItemFile | <span> attributes |
QueueList | ScrollArea props |
QueueSection | Collapsible props |
QueueSectionTrigger | <button> attributes |
QueueSectionLabel | <span> attributes, plus its own options |
QueueSectionContent | CollapsibleContent props |
Queue | <div> attributes |
Open the source under Manual above for the exact prop types.
On This Page