Queue
What is lined up for the agent and what it already did, in sections the reader can fold.
NewInstallation
Copy and paste the following code into your project.
Update the import paths to match your project structure.
Anatomy
Use it for follow ups the reader typed while the agent was busy, or for work the agent lined up for later. Sections fold on their own, so a long history of done items stays out of the way.
Item actions show on hover and on focus with a mouse, and stay visible on touch screens. Give each one a
label: it becomes the button's accessible name and its tooltip.Composition
Use the following composition to build a
Queue:Accessibility
- Each section trigger is a button with
aria-expandedthat controls its list. - Done items add "Done" for screen readers, since the check and the strike through are only visual.
- Actions are real buttons and stay reachable with
Tabeven while hidden from the pointer.
API Reference
Queue.Section
| Prop | Type | Default | Description |
|---|---|---|---|
defaultOpen | boolean | true | Open state when uncontrolled |
open | boolean | - | Controlled open state |
onOpenChange | (open: boolean) => void | - | Called when the open state changes |
className | string | - | Additional CSS classes |
Queue.SectionTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | - | Number shown at the end |
children | ReactNode | - | Name of the section |
className | string | - | Additional CSS classes |
Queue.Item
| Prop | Type | Default | Description |
|---|---|---|---|
done | boolean | false | Checks the item off and strikes it out |
description | ReactNode | - | One line under the item |
actions | ReactNode | - | Buttons at the end, usually ItemAction |
doneLabel | string | 'Done' | Read by screen readers on done items |
className | string | - | Additional CSS classes |
Queue.ItemAction
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible name and tooltip |
children | ReactNode | - | The icon |
className | string | - | Additional CSS classes |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.