Conflict Banner

Conflict Banner is a copy-paste React component that stops overwrote a teammate's edit 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/conflict-banner
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

StopsOverwrote a teammate's edit

Release notes

Launch is planned for 14 November. Marketing owns the press release and the landing page.

Was this component page useful?

How do I install Conflict Banner?

pnpm dlx shadcn@latest add @bollard/conflict-banner

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

How do I use Conflict Banner in React?

conflict-banner-usage.tsx
import { ConflictBanner } from "@/components/ui/conflict-banner"

<ConflictBanner
  yourVersion={yours}
  theirVersion={theirs}
  editor="Priya"
  editedAt={editedAt}
  onKeepMine={() => setResolved("mine")}
  onUseTheirs={() => setResolved("theirs")}
/>

What input mistakes does Conflict Banner catch?

  • Saving over a newer version from someone else
  • Unseen differences, via a word diff
  • How much of the other person's work "Keep mine" would discard
  • Versions that turn out to be identical

What props does Conflict Banner accept?

ConflictBanner props
PropTypeDefault
yourVersion* (required)

The text you were editing.

string—
theirVersion* (required)

The text now saved on the server by someone else.

string—
editor* (required)

Who saved the other version, e.g. "Priya".

string—
editedAt* (required)

When they saved it.

Date | number | string—
onKeepMine* (required)

Overwrite their version with yours.

() => void—
onUseTheirs* (required)

Drop your edits and load theirs.

() => void—
message

Templates: `{editor}`, `{when}` and `{count}` ("3 words") are filled in.

string"{editor} edited this {when} while you were working."
identicalText

Shown when both versions are the same.

string"{editor} edited this {when}. Their version matches yours."
confirmText

Overwrite confirmation text ({count} words are filled in).

string"Keeping yours replaces {count} {editor} wrote."
compareLabel

Text for the compare toggle.

string"Compare"
useTheirsLabel

Text for the use-theirs button.

string"Use theirs"
keepMineLabel

Text for the keep-mine button.

string"Keep mine"
overwriteLabel

Text for the confirm-overwrite button.

string"Overwrite {editor}'s edit"
cancelLabel

Text for the cancel button.

string"Cancel"
dismissLabel

Text for the dismiss button.

string"Got it"
locale

Locale for "4 min ago". Defaults to the browser's.

string—
justNowLabel

Shown instead of a time for edits under a minute old.

string"just now"
regionLabel

Accessible name of the banner. `{editor}` is filled in.

string"Edit conflict with {editor}"

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

How is Conflict Banner accessible?

  • role="region" with an aria-label naming the editor
  • Message is aria-live="polite"; the compare toggle uses aria-expanded
  • The overwrite confirmation is a labelled group; focus moves to Cancel and Escape closes it

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: Detect conflicts on the server with a version or ETag check, and reject stale writes unless overwrite is explicit.

  • Needs both versions and the editor from your backend; it doesn't detect conflicts itself
  • The diff is word-level on plain text

What expensive mistakes does Conflict Banner stop?

Overwrote a teammate's edit

Also known as

edit conflict · merge conflict · optimistic locking · keep mine · version mismatch · collaboration · cms · diff

Field type

What dependencies does Conflict Banner require?

Conflict Banner facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameConflict Banner
Registry identifier@bollard/conflict-banner
Install commandnpx shadcn@latest add @bollard/conflict-banner
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 Conflict Banner

What form validation mistake does Conflict Banner catch?

Conflict Banner prevents overwrote a teammate's edit. Names who changed a record while you were editing and shows the difference, so nobody silently overwrites a teammate's edit. Catches: Saving over a newer version from someone else, Unseen differences, via a word diff, How much of the other person's work "Keep mine" would discard, Versions that turn out to be identical. Limitation: validate conflict-banner schemas on backend.

How do I install conflict-banner with shadcn?

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

What props customize Conflict Banner?

Conflict Banner accepts `yourVersion`, `theirVersion`, `editor`, `editedAt`, `onKeepMine`. Configures edit conflict, merge conflict, optimistic locking behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of conflict-banner?

Needs both versions and the editor from your backend; it doesn't detect conflicts itself. The diff is word-level on plain text Server requirement: Detect conflicts on the server with a version or ETag check, and reject stale writes unless overwrite is explicit.

How does Conflict Banner meet accessibility guidelines?

role="region" with an aria-label naming the editor. Message is aria-live="polite"; the compare toggle uses aria-expanded. The overwrite confirmation is a labelled group; focus moves to Cancel and Escape closes it. Minimizes errors: someone else edited this, last write wins overwrote changes.

Which components pair with Conflict Banner?