Dedupe Key Picker

Dedupe Key Picker is a copy-paste React component that stops dedupe merged the wrong rows 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/dedupe-key-picker
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

StopsDedupe merged the wrong rows

Was this component page useful?

How do I install Dedupe Key Picker?

pnpm dlx shadcn@latest add @bollard/dedupe-key-picker

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

How do I use Dedupe Key Picker in React?

dedupe-key-picker-usage.tsx
import { DedupeKeyPicker } from "@/components/ui/dedupe-key-picker"

<DedupeKeyPicker
  rows={contacts}
  columns={["email", "phone", "city", "signed_up"]}
  defaultValue={["email", "signed_up"]}
  onApply={() => new Promise((resolve) => setTimeout(resolve, 600))}
/>

What input mistakes does Dedupe Key Picker catch?

  • Near-unique columns (timestamps, ids) that prevent any merge, with "leave it out"
  • Keys so broad that one value covers a large share of rows (coarseShare)
  • Blank keys, kept separate instead of merged together
  • Values a merge would discard, shown in sample collisions

What props does Dedupe Key Picker accept?

DedupeKeyPicker props
PropTypeDefault
rows* (required)

The rows to deduplicate. A sample of a few thousand is plenty.

DedupeRow[]—
columns

Columns offered as key candidates. Defaults to the keys of the first row.

string[]—
value

Controlled key columns.

string[]—
defaultValue

Initial key columns when uncontrolled.

string[][]
onValueChange

Called with the chosen key columns.

(keys: string[]) => void—
normalize

Controlled "ignore case and spaces".

boolean—
defaultNormalize

Initial "ignore case and spaces" when uncontrolled.

booleantrue
onNormalizeChange

Called when normalisation is turned on or off.

(normalize: boolean) => void—
onApply

Runs the merge. May return a Promise; the button shows a pending state.

(plan: { keys: string[]; normalize: boolean }) => void | Promise<unknown>—
samples

Groups shown as sample collisions.

number2
coarseShare

Share of rows one key may absorb before it is called too broad.

number0.25
locale

BCP 47 locale for numbers.

string—
messages

Every visible string, with `{placeholders}`.

Partial<DedupeKeyPickerMessages>—

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

How is Dedupe Key Picker accessible?

  • Column toggles are buttons with aria-pressed and their uniqueness share in text
  • The preview is aria-live="polite"
  • Apply sets aria-busy while running; errors use role="alert"

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: Run the merge in a transaction on the server with a backup or undo path; the preview is computed from the rows you pass.

  • Works on the rows you pass; on a sample, counts are estimates for the full table
  • Normalisation (case, spaces) is optional and simple

What expensive mistakes does Dedupe Key Picker stop?

Dedupe merged the wrong rows

Also known as

dedupe · remove duplicates · merge records · crm contacts · data cleaning · unique key · pandas · csv import

Field type

What dependencies does Dedupe Key Picker require?

Dedupe Key Picker facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameDedupe Key Picker
Registry identifier@bollard/dedupe-key-picker
Install commandnpx shadcn@latest add @bollard/dedupe-key-picker
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 Dedupe Key Picker

What form validation mistake does Dedupe Key Picker catch?

Dedupe Key Picker prevents dedupe merged the wrong rows. Previews how many rows a dedupe would merge as you pick key columns, so it doesn't merge nothing or merge too much. Catches: Near-unique columns (timestamps, ids) that prevent any merge, with "leave it out", Keys so broad that one value covers a large share of rows (coarseShare), Blank keys, kept separate instead of merged together, Values a merge would discard, shown in sample collisions. Limitation: validate dedupe-key-picker schemas on backend.

How do I install dedupe-key-picker with shadcn?

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

What props customize Dedupe Key Picker?

Dedupe Key Picker accepts `rows`, `columns`, `value`, `defaultValue`, `onValueChange`. Configures dedupe, remove duplicates, merge records behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of dedupe-key-picker?

Works on the rows you pass; on a sample, counts are estimates for the full table. Normalisation (case, spaces) is optional and simple Server requirement: Run the merge in a transaction on the server with a backup or undo path; the preview is computed from the rows you pass.

How does Dedupe Key Picker meet accessibility guidelines?

Column toggles are buttons with aria-pressed and their uniqueness share in text. The preview is aria-live="polite". Apply sets aria-busy while running; errors use role="alert". Minimizes errors: remove duplicates wrong, dedupe merged nothing.

Which components pair with Dedupe Key Picker?