Transfer Ownership

Transfer Ownership is a copy-paste React component that stops ownership transferred to the wrong email 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/transfer-ownership
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

StopsOwnership transferred to the wrong email

Was this component page useful?

How do I install Transfer Ownership?

pnpm dlx shadcn@latest add @bollard/transfer-ownership

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

How do I use Transfer Ownership in React?

transfer-ownership-usage.tsx
import { TransferOwnership, type TransferRequest } from "@/components/ui/transfer-ownership"

<TransferOwnership
  resource="Acme workspace"
  orgDomain="acme.in"
  members={MEMBERS}
  requiredPlan="Team"
  defaultValue="priya.nair@gmail.com"
  moves={["Billing and the ₹24,000/yr plan", "Deleting the workspace", "Owner role"]}
  keeps={["Admin access", "Your personal drafts"]}
  request={request}
  onRequestChange={setRequest}
  onSend={() => new Promise<void>((resolve) => setTimeout(resolve, 500))}
  onWithdraw={() => new Promise<void>((resolve) => setTimeout(resolve, 300))}
/>

What input mistakes does Transfer Ownership catch?

  • Recipient email outside your organisation, with a likely internal match to switch to
  • Recipient plan too low to own the resource
  • What moves to them and what stays with you
  • Pending request and its expiry, with withdraw

What props does Transfer Ownership accept?

TransferOwnership props
PropTypeDefault
orgDomainstring—
membersOrgMember[]—
requiredPlanstring—
plans

Plans from lowest to highest, used to compare against `requiredPlan`.

string[]—
resource* (required)

What is being handed over, e.g. "Acme workspace".

string—
moves* (required)

What moves to the new owner.

string[]—
keeps* (required)

What stays with you, e.g. "Admin access", "Your personal drafts".

string[]—
request

Controlled request. `null` means no transfer has been sent.

TransferRequest | null—
defaultRequest

Starting pending request when uncontrolled.

TransferRequest | nullnull
onRequestChange

Called when a request is sent or withdrawn.

(request: TransferRequest | null) => void—
onSend* (required)

Sends the request. Return a promise to show a pending state; a rejection keeps the form.

(recipient: { email: string; name?: string }) => void | Promise<void>—
value

Controlled recipient email.

string—
defaultValue

Starting recipient email when uncontrolled.

string""
onValueChange

Called with the recipient email.

(email: string) => void—
onWithdraw

Withdraws a pending request.

() => void | Promise<void>—
expiresInDays

How long the recipient has to accept.

number7
title

Heading, given the resource name.

(resource: string) => React.ReactNode(r) => `Transfer ownership of ${r}`
label

Label of the recipient email input.

string"New owner's email"
sendLabel

Label of the send-request button.

string"Send transfer request"
externalText

Warning for an email outside the organisation.

(domain: string) => string(d) => `${d} is outside your organization. They'd own thi…
externalAck

Checkbox text to confirm an outside recipient.

(domain: string) => string(d) => `I mean to hand this to someone at ${d}`
planText

Warning when the recipient's plan is too low.

(name: string, plan: string, required: string) => string(n, p, r) => `${n} is on ${p}. Owning this needs ${r}, so…
statusText

Status line once a request exists. `who` is their name or email.

(status: TransferStatus, who: string, resource: string, daysLeft: number) => string(status, who, r, days) => status === "accepted" ? `${who}…
noteText

Line under the readback before sending.

(expiresInDays: number) => string(days) => `Nothing moves until they accept. They have ${p…
withdrawLabel

Label of the withdraw button.

string"Withdraw request"
chooseAgainLabel

Label of the choose-someone-else button.

string"Choose someone else"

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

How is Transfer Ownership accessible?

  • Section labelled by its title; email input has a <label>, aria-invalid on plan issues and a polite hint
  • Blocking issues use role=alert
  • Withdraw sets aria-busy while pending; state changes in a polite live region

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: Authorize the transfer server-side, require the recipient's acceptance, enforce plan eligibility and expire stale requests.

  • Recipient and plan data come from your props
  • The accept-before-transfer flow must be implemented by your backend

What expensive mistakes does Transfer Ownership stop?

Ownership transferred to the wrong email

Also known as

transfer ownership · change owner · workspace owner · admin · transfer repo · invite · handover

Field type

What dependencies does Transfer Ownership require?

Transfer Ownership facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameTransfer Ownership
Registry identifier@bollard/transfer-ownership
Install commandnpx shadcn@latest add @bollard/transfer-ownership
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 Transfer Ownership

How does Transfer Ownership protect destructive mutations?

Transfer Ownership prevents ownership transferred to the wrong email. Enforces deliberate friction against Recipient email outside your organisation, with a likely internal match to switch to, Recipient plan too low to own the resource, What moves to them and what stays with you, Pending request and its expiry, with withdraw. Limitation: authorize transfer-ownership mutations on the server.

How do I install transfer-ownership with shadcn?

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

What props customize Transfer Ownership?

Transfer Ownership accepts `orgDomain`, `members`, `requiredPlan`, `plans`, `resource`. Configures transfer ownership, change owner, workspace owner behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of transfer-ownership?

Recipient and plan data come from your props. The accept-before-transfer flow must be implemented by your backend Server requirement: Authorize the transfer server-side, require the recipient's acceptance, enforce plan eligibility and expire stale requests.

How does Transfer Ownership meet accessibility guidelines?

Section labelled by its title; email input has a <label>, aria-invalid on plan issues and a polite hint. Blocking issues use role=alert. Withdraw sets aria-busy while pending; state changes in a polite live region. Minimizes errors: transferred to wrong person, typo in transfer email.

Which components pair with Transfer Ownership?