Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Queue
  3. API and Development

Queue

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import Queue, QueueMaxHeight from @prepared911/ui/queue. Queue takes the props below and nothing else: no native attributes, no ref, no style.
PropTypeDefaultNotes
labelLocalizedMessage | DisplayValuerequiredHeader text; names the header button with the tally
itemsreadonly QueueItem[][]The entries, oldest first
iconGlyphDecorative glyph before the label
countnumberitems.lengthTally beside the label
maxHeightQueueMaxHeightCaps the entries' height and scrolls beyond it
completedLabelLocalizedMessageNames a completed entry's check; development builds warn once when an entry is completed and this is missing
openbooleanControlled open state
defaultOpenbooleantrueInitial open state when uncontrolled
onOpenChange(open: boolean, details: ChangeDetails) => voidCancelable with details.cancel()
classNamestringAppended to the section
QueueItem
FieldTypeNotes
idstringRequired; the React key
contentLocalizedMessage | DisplayValueRequired
descriptionLocalizedMessage | DisplayValueSecond line
completedbooleanDefault false
actionsreadonly QueueItemAction[]Icon buttons for the entry
QueueItemAction
FieldTypeNotes
iconGlyphGlyph of the icon-only button
labelLocalizedMessageAccessible name and list key
onClick() => voidRuns on press
QueueMaxHeight
Small (96px), Medium (128px), Large (256px).
Exports
Queue, QueueMaxHeight, and the types QueueProps, QueueItem and QueueItemAction.
Props
NameTypeDefaultDescription
labelLocalizedMessage | DisplayValue—Section header, such as "Queued": copy from a formatter, or data. It names the disclosure button.
classNamestring—Classes appended to the section.
completedLabelLocalizedMessage—Text that marks a completed entry for assistive technology, such as "Completed". Read before the content of each completed entry. Required in practice whenever an entry is completed; development builds warn once when it is missing.
countnumber—Tally beside the label. Defaults to the number of items; pass a number to show another tally such as completed.
defaultOpenbooleantrueInitial open state when uncontrolled.
iconGlyph—Decorative glyph before the label.
itemsreadonly QueueItem[]—The queue, oldest first. The list layout is owned by the component; callers supply data, not structure.
maxHeightQueueMaxHeight—Caps the height of the items and scrolls beyond it. Omitted, the section grows with its items.
onOpenChangeCollapsibleOpenChangeHandler—Fires when the header button requests a change. details.cancel() keeps the current state.
openboolean—Whether the items are shown (controlled).
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Queue / Usage
Next
Queue / Accessibility
On this page
QueueItem
QueueItemAction
QueueMaxHeight
Exports
Props
Storybook