Approval Queue

Review queue for pending expense, access, deploy and time-off requests with row and bulk selection, approve and reject that swipe rows out optimistically with an undo toast, a dialog that asks for a rejection reason, Pending/Approved/Rejected tabs whose counts roll, and j/k/x/a/r keyboard shortcuts.

Preview

Approval Queue preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/approval-queue
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

requests?
ApprovalRequest[]

Controlled list. Decisions call `onRequestsChange` with updated statuses.

—
defaultRequests?
ApprovalRequest[]

Uncontrolled initial list.

[]
onRequestsChange?
((requests: ApprovalRequest[]) => void)
—
onApprove?
((ids: string[]) => void)
—
onReject?
((ids: string[], reason: string) => void)
—
onUndo?
((ids: string[]) => void)

Fired when a decision is undone from the toast or reopened.

—
currency?
string

Default currency for amounts. Default "USD".

USD
locale?
string

Locale for numbers. Default "en-US".

en-US
listHeight?
string

Height of the scrolling list. Default "16rem".

16rem
showShortcuts?
boolean

Show the j/k/a/r keyboard legend. Default true.

true
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated