Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Policy Compliance Status Account Block for React

The rules a managed account must meet by a deadline, as a bento of hairline cells: five rules with their state in words and a Fix button, a segmented bar, days to the deadline 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

Show a managed account what its company requires, and by when, with this policy panel for React with Base UI. A hairline frame with a plus mark on each corner opens with a figure ("4 of 5 met"), a segmented Progress bar with one segment per rule, and the sentence that matters: "Access is limited on 12 Nov 2026 unless the last one is fixed. 29 days to go from 14 Oct." Under it five rules sit in a bento of shared hairlines: two-factor sign-in, a password under 90 days, a recovery method, no unused tokens and a device lock. Each cell says Met or Action needed with a glyph, gives one line of why, and where a rule is not met offers a Shine Button Fix. The password's age is worked out from a typed date and the page's day. Fix marks a rule met in this page only and Undo walks it back. It's built from Progress, Badge, Button, Shine Button and Guides, with a CSS entrance only. For an admin-managed account page, a security review or any app with a compliance deadline.

FAQ

How do I change the rules and the deadline?

Edit RULES: each has a title, whether it is base met, the ok sentence, the label of its Fix button and its width from md (the wide cell is the one that usually needs action). The deadline is DEADLINE, the password's last change is CHANGED with MAX_AGE, and "now" is AS_OF; the days to go and the password's age are worked out from those, never from the clock, so the page never goes stale.

What does Fix do?

In this demo it marks the rule met, moves the figure and the segmented bar, changes the sentence to "Every rule is met. Access stays as it is." and says so in the status line. Nothing is changed in the account. To make it real, send the user to the place that fixes the rule (the password form, the token list) and set the state from what your server reports when they come back.

How is the state shown without colour?

Every cell says Met or Action needed in words with a glyph, the figure and the bar both say how many of five are met, and the deadline sentence is plain text. Status colour is not used on any text or surface.

Why do the cells not move when a rule is fixed?

Every cell holds a reserved line for its reason and a reserved row for its button, so a rule that becomes met changes its words and loses its button without changing size. The wide cell stays wide and a quiet cell appears beside the last row when all five are met, so nothing reflows.

What stays local, and what does Undo do?

Everything is local and a reload starts again. Undo walks back the last fix and says what it undid, which also lets you reach the Action needed state again. Focus moves to the cell you fixed, so a keyboard or screen reader user lands on its new state.

How does it look on a phone, and is it accessible?

On a phone the cells are one column with the rule that needs action first, so its Fix button is on the first screen, and the foot with Undo stays pinned. The rules are a real list, each Fix button names its rule ("Change password: Password under 90 days"), and the status line is a polite live region present from the start. Dates keep their reading order in a right-to-left page.

  • Pro

    Security Review Account

    Sessions and devices

    A security review in three sections, devices, recent sign-ins and sign-in methods, where each item is answered with Yes, this is mine or Remove, with a progress bar and a Finish button that waits for every answer.

  • Pro

    A change-password form that says what it ends: three password fields with a line naming what the new one still needs, boxes for the other sessions, an app password and trusted devices, and a sentence that follows them.

  • Pro

    What it means that an employer manages an account, written for the person it belongs to: six things admins can or cannot do, the facts, and a way to leave that asks for the export first and the company's domain.

  • Pro

    What an account has proven and when each proof ends: four rows with the method, the day and a derived end date, a due-soon state, one band that takes a six-digit code or a name, and Undo.

  • Pro

    Trusted Devices Account

    Sessions and devices

    An account's trusted devices as a table of devices against two switches, one to skip the sign-in code and one to skip the password prompt, with a sentence on what each device's choice means and a meter against the limit.

  • Pro

    The workspaces in an account as one ruled list: current and default marks, Open, a menu with Make default and Leave (which asks first), a dialog to create one, a field to join with a code, and Undo.