Docs / Queue

Queue

Queue position and rate-limit countdown states.

Install

npx shadcn@latest add https://crate.onerollstudios.com/r/queue.json

Playground

You’re #3 in line
<Queue variant="line" position={3} retryIn={20} />

Import

import { Queue } from "@/components/agent-wait-states/queue";

Props

PropTypeRequiredDefaultNotes
classNamestringno
accentbooleannofalse
labelsPartial<CrateLabels>noReplace any of this component's labels. Overrides CrateProvider.
variant"line" | "rate-limit"no"line"
positionnumberno
retryInnumberno

States

Queue shows a different state for each value of variant:

  • variant: line, rate-limit

Labels

Override with the labels prop or a CrateProvider.

LabelEnglish default
queueWaiting"Waiting in line…"
queuePosition(position, f) => `You’re #${f.number(position)} in line`
rateLimitedUnknown"Slow down. Try again shortly."
rateLimited(seconds, f) => `Slow down. Try again in ${f.seconds(seconds)}`

Example

<Queue position={3} accent />
<Queue variant="rate-limit" retryIn={20} accent />

For coding agents: /llms/queue.md, generated from the same source.