Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Audit Visibility Account Block for React

Who can see which of a person's own account events: three groups against five categories as a matrix of switches, with the locked ones explained, a sentence that adds the matrix up and a Save that counts changes.

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

Let people decide who can look at their account history, with this visibility panel for React with Base UI. A hairline frame with a plus mark on each corner opens with a strip of the three groups that can look (You, Your administrators, Support staff), each with one sentence on who they are and how many of the five event categories they see. Under it a matrix has a row per category (sign-ins, password and factor changes, token use, data exports, setting changes) and a Switch in each group's column. You are always on; administrators are locked on for sign-ins, with a lock and the words Always on and the reason in the row's own sentence, because the account is managed; support staff start off and are granted per ticket unless a switch lets them see a category without asking. A sentence under the matrix adds it up, such as "Administrators see 3 of 5 categories", and the action foot counts the changes and holds a Shine Button and a Discard Button. On a phone each category is a block with three labelled switches. It's built from Switch, Badge, Button, Shine Button and Guides, with a native table and a CSS entrance only. For the security page of any product where staff or administrators can see a person's activity.

FAQ

How do I change the categories or the groups?

Edit CATEGORIES and VIEWERS. Each category has an id, a name, a hint and the viewers it locks on (use the hint to say why); each viewer has an id, a name and a sentence. SAVED is what the account has saved when the page opens. The strip's counts, the sentence under the matrix and the unsaved count all read from the switches, so nothing else needs editing. Add a column by adding a viewer and its cells.

What stays local, and how do I make Save real?

Save keeps the switches as this page's saved state and says "in this demo", so nothing reaches Wardmere. To make it real, send the changed cells to your settings service in save, mark them saved only when it answers and show a failure in the same status line. Enforce the locks on the server as well: a switch that is only disabled in the page is a request, not a rule.

Why are some cells locked?

Because the account is managed: administrators can always see sign-ins, and the row says so in words beside the lock, so the reason is never only in a tooltip. Your own column is locked on because you cannot hide your own history from yourself. A locked cell shows a lock and the words "Always on" instead of a switch that cannot move, so it reads the same to everyone and there is nothing to press.

What does the support column mean?

Support staff start with none of the categories. Normally a person grants access for one ticket, which is a separate flow; turning a category on here lets support see it without asking. The sentence under the matrix says which of the two is true now, "Support staff see none of them unless you grant a ticket" or "Support staff can see 2 of 5 without asking".

How does it look on a phone?

The strip stacks, and each category becomes a block: its name and sentence, then three rows with the group's name and its switch, each switch named "Sign-ins: Your administrators". The table and the blocks read the same state, so a change in one shows in the other when the screen is resized. The action foot stays pinned to the bottom of the screen at every width.

Is it accessible?

The table has a caption, column heads and a row header per category; each switch is named for its group and category ("Your administrators for Sign-ins"). The foot's status line is a polite live region present from the start, counting what is unsaved and what was saved. Save and Discard are always there; when there is nothing to do they are marked unavailable and answer "No changes to save."

  • Pro

    A person's own log of staff visits to their account: a switch that makes support ask first, a search and a reason filter, a table of visits with who, why, the ticket and what was opened, and a real CSV of the rows shown.

  • Pro

    Activity Log Account

    Sessions and devices

    What changed on an account as a vertical timeline grouped by day: icon nodes on a rail, a filter with counts for sign-in, security and data events, and a Details button that opens the device, place and address of each.

  • Pro

    Sign-in History Account

    Sessions and devices

    Every sign-in attempt in the last 14 days in a sortable, searchable table with failed attempts marked by an icon and a reason, rows that open to the user agent and steps, pages of 5 or 10 and four derived figures.

  • 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

    Privacy Settings

    Privacy and consent

    A privacy panel with three presets that set five switches, a sentence that adds them up, and a row per setting that says in words what it means for you and what it shares.

  • Pro

    A notification settings panel: a channel strip with all-or-nothing checkboxes, a matrix of switches by activity and channel with a locked security email, quiet hours, and a save bar that counts unsaved changes.