Revoke Access Preview

Revoke Access Preview is a copy-paste React component that stops removed member's integrations stopped working before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/revoke-access-preview
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsRemoved member's integrations stopped working

Was this component page useful?

How do I install Revoke Access Preview?

pnpm dlx shadcn@latest add @bollard/revoke-access-preview

The files land in your project. They're yours to edit.

How do I use Revoke Access Preview in React?

revoke-access-preview-usage.tsx
import { RevokeAccessPreview, type ActiveSession, type Reassignment, } from "@/components/ui/revoke-access-preview"

<RevokeAccessPreview
  key={run}
  name="Rahul Mehta"
  access={["Edit 4 projects and billing settings", "Use 2 personal API tokens"]}
  owned={OWNED}
  assignees={ASSIGNEES}
  defaultValue={{ p1: "u_sara" }}
  sessions={sessions}
  integrations={INTEGRATIONS}
  onConfirm={(reassign) => new Promise<void>((resolve) => setTimeout(() => {
    setResult(reassign)
    resolve()
  }, 600))}
  onCancel={() => setRun((n) => n + 1)}
/>

What input mistakes does Revoke Access Preview catch?

  • Owned items left without an owner, with reassign-to and reassign-all
  • Sessions that end, flagging any active within liveWithin
  • Integrations that stop because they run on that person's credentials
  • Integrations that keep running because they belong to the workspace
  • Confirm label that names how many items stay unowned

What props does Revoke Access Preview accept?

RevokeAccessPreview props
PropTypeDefault
name* (required)

Who or what is losing access, e.g. "Rahul Mehta" or "ci-deploy token".

string—
access* (required)

What they can no longer do, e.g. "Edit 4 projects".

string[]—
owned

What they own that would be left without an owner.

OwnedItem[][]
assignees

People who can take over owned items.

Assignee[][]
sessions

Sessions that end when access is revoked.

ActiveSession[][]
integrations

Integrations affected by the removal.

AffectedIntegration[][]
value

Controlled reassignment.

Reassignment—
defaultValue

Starting reassignments when uncontrolled.

Reassignment{}
onValueChange

Called with the reassignment after every change.

(value: Reassignment) => void—
liveWithin

Sessions active more recently than this (ms) are flagged as in use.

number15 * 60_000
onConfirm* (required)

Runs with the final reassignment. Return a promise to show a pending state; a rejection is caught.

(reassign: Reassignment) => void | Promise<void>—
onCancel

Called when the user cancels.

() => void—
suggestedAssigneeId

Who "Give all to" offers, e.g. their manager. Defaults to the first assignee.

string—
messages

Override headings and other small strings (see `REVOKE_MESSAGES`).

Partial<RevokeMessages>—
title

Heading, given the person's name.

(name: string) => React.ReactNode(n) => `Remove ${n}?`
confirmLabel

Confirm label, given the name and how many items stay unowned.

(name: string, orphaned: number) => string(n, orphaned) => (orphaned > 0 ? `Remove and leave ${orph…
pendingLabel

Confirm label while onConfirm runs.

string"Removing…"
cancelLabel

Label of the Cancel button.

string"Cancel"
unownedLabel

Picker option for leaving an item unowned.

string"No owner"
orphanText

Warning for the number of unowned items.

(count: number) => string(count) => `${count} ${count === 1 ? "item" : "items"} wi…
reassignAllLabel

Label of the reassign-all fix, given the assignee.

(assignee: string) => string(assignee) => `Give all to ${assignee}`

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

How is Revoke Access Preview accessible?

  • Section labelled by its title; each owned item's picker has a <label>
  • Unowned warning in a polite live region with a one-tap fix
  • Stops/keeps-running stated as text, not colour alone
  • Confirm sets aria-busy while pending; motion skipped under reduced motion

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Revoke tokens and sessions server-side, re-check authorization on the removal, and reassign ownership in the same transaction.

  • Only knows the owned items, sessions and integrations you pass
  • Does not revoke anything; onConfirm receives the reassignment

What expensive mistakes does Revoke Access Preview stop?

Removed member's integrations stopped working

Also known as

remove member · offboarding · revoke access · api token · oauth app · team members · reassign · workspace members

What dependencies does Revoke Access Preview require?

Revoke Access Preview facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameRevoke Access Preview
Registry identifier@bollard/revoke-access-preview
Install commandnpx shadcn@latest add @bollard/revoke-access-preview
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Revoke Access Preview

How does Revoke Access Preview protect destructive mutations?

Revoke Access Preview prevents removed member's integrations stopped working. Enforces deliberate friction against Owned items left without an owner, with reassign-to and reassign-all, Sessions that end, flagging any active within liveWithin, Integrations that stop because they run on that person's credentials, Integrations that keep running because they belong to the workspace, Confirm label that names how many items stay unowned. Limitation: authorize revoke-access-preview mutations on the server.

How do I install revoke-access-preview with shadcn?

Run `npx shadcn@latest add @bollard/revoke-access-preview`. Sources added: registry/default/revoke-access-preview/revoke-access-preview.tsx. Package requirements: lucide-react.

What props customize Revoke Access Preview?

Revoke Access Preview accepts `name`, `access`, `owned`, `assignees`, `sessions`. Configures remove member, offboarding, revoke access behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of revoke-access-preview?

Only knows the owned items, sessions and integrations you pass. Does not revoke anything; onConfirm receives the reassignment Server requirement: Revoke tokens and sessions server-side, re-check authorization on the removal, and reassign ownership in the same transaction.

How does Revoke Access Preview meet accessibility guidelines?

Section labelled by its title; each owned item's picker has a <label>. Unowned warning in a polite live region with a one-tap fix. Stops/keeps-running stated as text, not colour alone. Confirm sets aria-busy while pending; motion skipped under reduced motion. Minimizes errors: removed user broke integration, revoked token broke prod.

Which components pair with Revoke Access Preview?