Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Policy Update Diff Success Block for React

A confirmation panel for a new policy version: three clauses as before and after with removed words struck through and added words underlined, who has read it by department, a reminder for those who haven't and a real PDF download.

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

Show what a new version changed, and who has seen it, with this confirmation panel for React with Base UI. It's the panel Charterwick, a policy-management app, shows when a policy has a new version: a header with one action, the Shine Button that downloads it as a PDF, over one framed card ruled by Guides. At the start of the card are the clauses that changed, each as two lines: the old wording with what was removed struck through and marked with a minus and the word "Removed", and the new wording with what was added underlined and marked with a plus and "Added". At the end is who has read it, one row per department with a bar and "19 of 22", and an outline Button that queues a reminder for everyone who hasn't. For policy, compliance and document-control tools, and any change log that has to be read by people.

FAQ

What stays in the page, and how do I wire it for real?

Nothing was published or sent. The wording, the five departments and their counts are typed sample data, and Remind 14 people only changes this page ("Reminder queued for 14 people in this demo. Nothing was sent."). To wire it, build CLAUSES from your two versions (each as pieces of unchanged, removed and added text) and DEPARTMENTS from your acknowledgement records, and send the reminder from remind.

How is the diff drawn, and can it be read without color?

Each clause is a list of typed pieces. The old wording is the unchanged and removed pieces, with the removed ones in a real del element (struck through, in a heavier weight) under a minus and the word "Removed"; the new wording is the unchanged and added pieces, with the added ones in an ins element (underlined) under a plus and "Added". Assistive technology announces the two elements as removed and inserted text, and nothing is conveyed by color. A clause that was dropped shows its words struck through and "Nothing replaces it" in place of the new wording.

Where do the totals come from?

From the departments. The people who have read it and the people who have to are sums of the five rows (39 of 53, shown as a last row named Everyone), the percentage is rounded from them, the number on the reminder button is the people still to read, and the clause counts in the header come from the clauses. Each bar is the share of its own department and is hidden from assistive technology, since "19 of 22" carries the same fact.

Does Download PDF really work?

Yes. The page builds a small one-page PDF in the browser from the same wording the panel shows (each changed clause before and after, and the read count) and saves it through a Download Trigger. It is plain text in one font, named as a sample, and says in its second line that it comes from a demo. In your app, return the real document from your server instead.

What does Remind 14 people do?

It marks the button as queued ("Reminder queued", still focusable), changes the line above it to "14 reminded" and says so in the polite status line. Pressing it again says the reminder is already queued. It sends nothing.

How does it look on a phone?

The header's button drops under the sentence and the departments go under the clauses, with the reminder button at the end. Every clause keeps its two lines, so nothing is cut.

  • Pro

    Audit Log Settings

    Alerts and audit

    A settings change history in a fixed-height window: changes grouped by area in folds with counts, an actor filter, and a detail pane with the before and after values, who and when, and a Revert that undoes only the latest change to a setting, marks the original and adds a revert event at the top.

  • Pro

    Compliance Controls Settings

    Privacy and consent

    A policy review window: a rail of six sample policies grouped Overdue, Due soon and Current, and a pane with owner, cadence, the next review worked out from a typed date and who has acknowledged.

  • Pro

    A confirmation panel for a vendor finishing onboarding: the portal address with a copy button, a table of four compliance documents with verified and valid-until days and a state, and a line on when the first to expire is chased.

  • Pro

    A full-height confirmation after the last signature: a Signed stamp beside the heading, the completion record as a six-event table with fixed UTC times, the document hash with a real copy button, and a real .txt download of the record.

  • Pro

    Six collaboration rules beside a live preview: pick Member, Editor or Guest and a drawn document with a comment thread plus five rows say what that person can view, comment on, reply to, resolve and mention, and why.

  • Pro

    Audit Scorecard Success

    Saves and updates

    A confirmation page for a finished control review: a ring of the checks that passed worked out from six control families, each family as a row of cells (filled for a pass, hollow for a check that did not), a short list of findings and dates, and a real one-page PDF summary to download.