Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Approval Workflow Reviews Block for React

One review's route to the page as a Steps band (Submitted, Checks, Read by a person, Published) with its three checks, a short activity log and Advance and Send back, for any of five submitted reviews.

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

An approval workflow for React with Base UI, for Dalegate, a fictional furniture maker. A compact header sits over a framed figure with + marks on its corners. In the frame, a row of five submitted reviews, the one in focus pressed; a Steps band across the route, Submitted, Checks, Read by a person and Published, as four cells on shared hairlines; and a two-cell body. At the start is the chosen review with its three checks (bought from Dalegate, no profanity or personal data, not a duplicate), each Pass or Needs a person once the checks have run. At the end are a short activity log and the two decisions, Advance, the Shine Button, and Send back. Which step is done, what each check says and every log line follow from the typed reviews and their stage; the rating is never a check. It's built from Steps, Frame, Rating, Avatar, Button and Shine Button. On a phone the steps stack as rows and the five reviews scroll sideways.

FAQ

How do I change the reviews and the checks?

Edit SUBMITTED: each review has a stage (how many of the four steps are done) and passes, one true or false per check in the order of CHECKS. The Steps band, the pass or "Needs a person" wording, the "2 of 3 passed" line and the picker's "Waiting for a person" words are all worked out from those two fields. Add a check by adding a name to CHECKS and a value to each review's passes.

What do Advance and Send back do?

Advance moves the chosen review one step along the route and Send back moves it one step back; neither goes past the ends, and each says what happened in a polite line. A review can wait at Read by a person with a check marked Needs a person, and advancing it past that step marks the check "Read by a person". Nothing is published in this demo: the line says so, and a reload starts afresh.

Where does focus go when a button switches off?

Advance is switched off once a review is Published and Send back once it is only Submitted. When that happens focus moves to the other button, so a keyboard user is never left on a disabled control.

Does the frame change height when I pick another review?

No. The chosen review with its checks and an unseen copy of all five share one grid cell, so the activity log and the buttons stay where they are. The log always shows four lines, with "Not yet." for a step that hasn't happened.

Why is the rating not one of the checks?

A route that held back low ratings would be hiding honest reviews. The three checks ask only whether the reviewer bought the item, whether the text holds profanity or personal data and whether it repeats another review; a one-star review that passes them is published like any other, as the fourth review here is.

Does it work right to left?

Yes. The picker, the steps and the two body cells follow the page's direction with logical classes, and dates, counts and the log's sentences are wrapped so their digits stay in order. The step numbers keep their digits.

  • Pro

    A keyboard triage queue for a marketplace: eight held reviews with a progress line, and the review in focus with Approve, Reject and Escalate, each on a key, a polite status line and Undo.

  • Pro

    Flagged reviews of a travel-guide series as accordion rows ordered by report count, each opening to the reasons tally, the reporters, the review and two decisions: Dismiss flags, or Remove review behind a confirm dialog.

  • Pro

    Twelve reviews of an appliance-repair firm in four state lanes (New, In review, Replied, Resolved), each card with a Move to menu instead of dragging, counts worked out from where the cards sit.

  • Pro

    Ten skincare reviews in a sortable table with status tabs and counts, a select-all checkbox with a partial state, and a closing action band to Publish, Hide or Delete the chosen rows, Delete behind a confirm dialog.

  • 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

    A merchant review inbox for a greenhouse-kit maker: Tabs for All, Needs action and Replies with counts, a Mark all as read button and full-width ruled rows under day dividers with inline Approve, Reply and Mark read.