Reply All Guard

Reply All Guard is a copy-paste React component that stops reply all to the whole company 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/reply-all-guard
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

StopsReply all to the whole company

Was this component page useful?

How do I install Reply All Guard?

pnpm dlx shadcn@latest add @bollard/reply-all-guard

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

How do I use Reply All Guard in React?

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 input mistakes does Reply All Guard catch?

  • 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

What props does Reply All Guard accept?

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.

How is Reply All Guard accessible?

  • 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.

What are the limitations and server boundaries?

  • 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 expensive mistakes does Reply All Guard stop?

Reply all to the whole company

Also known as

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

Field type

What dependencies does Reply All Guard require?

Reply All Guard facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameReply All Guard
Registry identifier@bollard/reply-all-guard
Install commandnpx shadcn@latest add @bollard/reply-all-guard
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 Reply All Guard

What form validation mistake does Reply All Guard catch?

Reply All Guard prevents reply all to the whole company. 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. 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. Limitation: validate reply-all-guard schemas on backend.

How do I install reply-all-guard with shadcn?

Run `npx shadcn@latest add @bollard/reply-all-guard`. Sources added: registry/default/reply-all-guard/reply-all-guard.tsx, registry/default/reply-all-guard/reply.ts. Package requirements: lucide-react.

What props customize Reply All Guard?

Reply All Guard accepts `message`, `value`, `defaultValue`, `onValueChange`, `largeAt`. Configures reply all, email, distribution list behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of reply-all-guard?

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 Server requirement: backend verification for reply-all-guard.

How does Reply All Guard meet accessibility guidelines?

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. Minimizes errors: accidental reply all, replied to distribution list.

Which components pair with Reply All Guard?