Reply All Guard

Shows how many people a reply-all really reaches and who is outside the organisation before it goes, with a one-tap reply to the sender only.

StopsReply all to the whole company

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/reply-all-guard.json

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

Usage

reply-all-guard-usage.tsx
import { ReplyAllGuard, type ReplySource } from "@/components/ui/reply-all-guard"

<ReplyAllGuard
  key={key}
  message={scenario.message}
  me="tushar@acme.com"
  orgDomains={["acme.com"]}
  listSizes={{ "all-staff@acme.com": 1240 }}
  myLists={["all-staff@acme.com"]}
  returnFocusRef={bodyRef}
/>

What it catches

  • Real reach, with list member counts you supply
  • External recipients, grouped by domain
  • You were BCC'd or forwarded the mail, so reply-all would reveal you (not flagged when it came via a list you're on)
  • A Reply-To that points somewhere other than the sender
  • Large audiences above largeAt

Props

ReplyAllGuard props
PropTypeDefault
message* (required)

The message being replied to: From, Reply-To, To and Cc as header strings or mailboxes.

ReplySource—
value

Controlled mode.

ReplyAllMode—
defaultValue

Initial mode when uncontrolled.

ReplyAllMode"all"
onValueChange

Called with the mode and the recipients it gives.

(mode: ReplyAllMode, recipients: { to: Mailbox[]; cc: Mailbox[] }) => void—
largeAt

Reach at which a reply all is called large.

number20
returnFocusRef

Where focus goes after a choice, usually the reply body. Defaults to the next button here.

React.RefObject<HTMLElement | null>—
messages

Any visible string.

Partial<ReplyAllMessages>—

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

Accessibility

  • Choice outcome announced in a polite live region
  • After a fix, focus moves to Undo; after Undo, back to the first fix or returnFocusRef
  • Fix options are plain buttons with text labels; icons are aria-hidden

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

Limitations

  • List sizes and your list memberships come from props; it cannot expand lists itself
  • BCC detection infers from headers; unusual relays can cause misses or false alarms
  • Does not send; it changes the recipient set you pass on

What it stops

Reply all to the whole company

Also known as

reply all · email · distribution list · bcc · cc · outlook · gmail · reply-to

Field type

Dependencies

Pairs well with