Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Approval Request Notification Block for React

A purchase request waiting on you in a spend-approval tool: the request and its approval chain side by side, Approve as the one primary, and Decline that asks for a reason before it goes through, with a receipt and Undo.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Put an approval where the approver will see it, with this request notification for React with Base UI. It is Nodmark, a spend-approval tool, asking Finance (you) about two sit-stand desks. One hairline frame is split in two: the request at the start, with its amount, who asked, the day it is needed, the quote number, what the budget keeps once it is approved and the requester's note in a Data List, and its approval chain at the end as read-only vertical Steps: the requester, the manager, you and the director. Under both, one band asks for your decision. Approve, the one Shine Button, moves the chain on to the director. Decline opens a Textarea that must be filled before it goes through and stops the chain at you. Either way a receipt takes the band's place, with an Undo. Guides draw the lines. For spend approvals, time off, access requests and any workflow where one person has to say yes or no.

FAQ

How do I fill it with a real request?

Edit REQUEST (title, requester, team, quantity, unit price in cents, the day it is needed, the quote and the note), BUDGET and CHAIN. The total is the quantity times the unit price, and the budget that remains is worked out from the cap, what is spent and this request, all in cents, so the figures can never disagree. The chain is a typed list, and YOU says which link is yours. Dates are fixed ISO values shown in UTC, so they read the same everywhere.

What really happens when I press Approve or Decline?

Only this page changes. Approve marks your step done and makes the director's step the current one; Decline marks your step with a cross and the word "Declined" and says the chain stopped; both show a receipt with an Undo and a polite status line that says nothing was sent. No email goes out, no money moves and no record is written. In your app call your server from approve and decline, send the reason along, and let the chain come from what the server says about each approver.

Why does Decline need a reason?

A decline that says nothing leaves the requester guessing, so the demo will not accept an empty one: it needs at least eight characters, otherwise a short message appears under the field, the field is marked invalid and focus goes to it. Escape in the field goes back to the question without losing the text, and the reason you typed is shown in the receipt. Change MIN_REASON to ask for more or less.

How is the chain drawn, and is it a control?

It is the catalog Steps as a list with no triggers: nobody can press a step, so the chain cannot be edited from here. Each link has a marker (a number, a tick for done, a cross for your declined step), its role and one line of what it did and when, and a screen reader hears "Done:" before the finished ones. Everything on it is derived from the decision, so there is no second copy to keep in step.

Does the panel move between the question, the reason field and the receipt?

No. The question, the reason form and the receipt are stacked in one cell; the inactive ones are hidden and inert, so the band keeps the height of the tallest and the page below never jumps. After each change focus moves to the next control: the reason field, then the receipt's Undo, then back to Approve or Decline.

How does it look on a phone?

The request comes first, then the chain under it, then the decision band, in that order, each full width; the two buttons stack. The chain's link lines stay at most two lines long so the list does not change height when a decision is made.

  • Pro

    A task assigned to you: its facts in a quiet start column, and in a framed panel a priority from three cells, a due day that must come after now, then Accept task or Reassign, each ending in a sentence with a permanent Undo.

  • Pro

    Two pending workspace invitations with who invited you, the role as a glyph and a word and the time, each answered in place without moving: Accept leaves a receipt with Undo and Switch workspace, Decline asks first, and the count follows.

  • Pro

    A narrow card for one issue that moved: the key and title, Before and After cells with a glyph and a word each and an arrow between them, who moved it and when, a three-line history, and a Watching switch whose sentence says what you will and will not hear.

  • Pro

    A release sign-off split: a summary of the release at the start, and a vertical approval chain at the end with people, states and times, an Approve button that advances it in the demo, a progress bar and a Deploy button that gives a stated demo result.

  • Pro

    Approval Chain Success

    People and approvals

    An expense-report confirmation page: the report's number, date, category and total, the approval chain down a rail with a word for where it stands, the attached receipts, and a withdraw button that says so in the chain.

  • Pro

    A medal shelf for a learning platform after a learner finishes a first project: eight drawn medals in a hairline grid with a New badge on the latest, and a popover on each medal with its criteria, a progress bar and the day it was earned.