Calendar External Guest Guard

Shows what outside guests on an internal invite will actually see, so an agenda, file or guest list isn't shared beyond your domain by mistake.

StopsInternal agenda shared with outside guests

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/calendar-external-guest-guard.json

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

Usage

calendar-external-guest-guard-usage.tsx
import { CalendarExternalGuestGuard, type GuardedEvent } from "@/components/ui/calendar-external-guest-guard"

<CalendarExternalGuestGuard
  value={event}
  onValueChange={setEvent}
  domains={["acme.com"]}
  organization="Acme"
  directory={[{ name: "Priya Sharma", email: "priya@acme.com" }]}
  onSend={(e) => new Promise<void>((resolve) => setTimeout(() => (setSent(`Sent to ${e.guests.length} guests.`), resolve()), 600))}
/>

What it catches

  • Guests outside your domains, and personal addresses standing in for a colleague's work address
  • Agenda lines that contain sensitive terms
  • Attachments whose names show, or that anyone with the link can open
  • Guest list, invite-others and modify-event rights given to outside guests
  • Recurring events, where outside guests get every future occurrence

Props

CalendarExternalGuestGuard props
PropTypeDefault
value

Controlled event.

GuardedEvent—
defaultValue

Initial event when uncontrolled.

GuardedEvent—
onValueChange

Called with the event after every fix (and after Undo).

(event: GuardedEvent) => void—
domains* (required)

Your organisation's email domains. Subdomains count as yours.

string[]—
organization

Shown in copy, e.g. "Acme". Defaults to the first domain.

string—
directory

Colleagues, used to spot a personal address standing in for a work one.

DirectoryPerson[][]
sensitiveTerms

Words that mark the agenda or a file name as internal.

string[]DEFAULT_SENSITIVE_TERMS
onSend* (required)

Sends the invite. Return a promise for a pending state; a rejection keeps everything as it was.

(event: GuardedEvent) => void | Promise<void>—
messages

Override any visible string.

Partial<CalendarExternalGuestGuardMessages>—

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

Accessibility

  • Guest remove buttons have aria-labels with the address
  • Send sets aria-busy while sending and is described by the second-press hint
  • Escape disarms the second press and returns focus to Send
  • Failures use role="alert"; status updates role="status"

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

Limitations

  • Models Google Calendar's sharing defaults; other calendar products behave differently
  • File access comes from what you pass (Drive link settings), not a live Drive check
  • Personal-address matching uses the directory you provide

What it stops

Internal agenda shared with outside guests

Also known as

google calendar · invite · external guest · meeting · agenda · attachments · gmail · guest permissions

Field type

Dependencies

Pairs well with