FX Send Receive

FX Send Receive is a copy-paste React component that stops helps prevent an invoice being paid short after fees 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/fx-send-receive
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 2 extra npm packages
  • A11y guidance in docs

StopsHelps prevent an invoice being paid short after fees

Was this component page useful?

How do I install FX Send Receive?

pnpm dlx shadcn@latest add @bollard/fx-send-receive

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

How do I use FX Send Receive in React?

fx-send-receive-usage.tsx
import { FxSendReceive, type FxAmountValue, type FxCharges, type FxReadback } from "@/components/ui/fx-send-receive"

<FxSendReceive
  from="USD"
  to="EUR"
  quote={QUOTE}
  expected={{ amount: 1200, currency: "EUR" }}
  recipientName="Lena"
  value={value}
  onValueChange={(v, r) => {
    setValue(v)
    setRead(r)
  }}
  charges={charges}
  onChargesChange={setCharges}
  locale="en-US"
/>

What input mistakes does FX Send Receive catch?

  • Invoice amount typed into "You send" instead of "They receive"
  • Invoice in a different currency from the receiving side
  • SHA charges that intermediary banks may deduct on the way
  • Paying more than the invoice
  • Fixes: lock "They receive" at the exact amount, or switch charges to OUR

What props does FX Send Receive accept?

FxSendReceive props
PropTypeDefault
from* (required)

Sending currency (ISO code).

string—
to* (required)

Receiving currency (ISO code).

string—
quote* (required)

Rate and fees from your provider. `rate` is receiving units per one sending unit.

FxQuote—
expected

What must arrive, e.g. the invoice. Turns on the wrong-box, short and over checks.

FxExpected | null—
expectedLabel

Word for what must arrive, e.g. "invoice" or "rent".

string—
recipientName

Recipient's name for the readback.

string—
value

Controlled amount and the side it was typed on.

FxAmountValue—
defaultValue

Initial amount when uncontrolled.

FxAmountValue{ side: "send", amount: null }
onValueChange

Called with the new value and the full readback (both amounts, fee, problems).

(value: FxAmountValue, readback: FxReadback) => void—
charges

Controlled SWIFT charge option. Leave all three charge props out to hide the switch.

FxCharges—
defaultCharges

Initial charge instruction when uncontrolled.

FxCharges—
onChargesChange

Called when the user picks OUR, SHA or BEN.

(charges: FxCharges) => void—
onReceiveCurrencyChange

Offer a one-tap switch of the receiving currency when the expected amount is in another one.

(currency: string) => void—
locale

BCP 47 locale for number and currency formatting.

string—
messages

Override any visible string.

Partial<FxSendReceiveMessages>—

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

How is FX Send Receive accessible?

  • Both amount fields have visible labels; the receive field gets aria-invalid when a warning applies
  • Charges choice is a radiogroup with roving tabindex and arrow-key navigation
  • Status line uses role=status; decorative icons are aria-hidden
  • Focus moves to the receive field after a fix that changes it
  • Animations are skipped under reduced motion

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: Re-quote the rate and fees on the server and charge against that server quote, with an idempotency key on the transfer.

  • Arithmetic on the quote you pass in; it does not fetch live rates or fees
  • Intermediary deductions are an estimate from your quote's maximum, not what banks will actually take
  • Does not check the recipient's account details or sanctions screening

What expensive mistakes does FX Send Receive stop?

Helps prevent an invoice being paid short after fees

Also known as

wire transfer · swift · fx · currency converter · remittance · send money · our sha ben · exchange rate

Field type

What dependencies does FX Send Receive require?

FX Send Receive facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameFX Send Receive
Registry identifier@bollard/fx-send-receive
Install commandnpx shadcn@latest add @bollard/fx-send-receive
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, motion
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 FX Send Receive

How does FX Send Receive prevent financial transaction errors?

FX Send Receive prevents an invoice being paid short after fees. Blocks Invoice amount typed into "You send" instead of "They receive", Invoice in a different currency from the receiving side, SHA charges that intermediary banks may deduct on the way, Paying more than the invoice, Fixes: lock "They receive" at the exact amount, or switch charges to OUR before processing. Limitation: apply idempotency keys for fx-send-receive.

How do I install fx-send-receive with shadcn?

Run `npx shadcn@latest add @bollard/fx-send-receive`. Sources added: registry/default/fx-send-receive/fx-send-receive.tsx, registry/default/fx-send-receive/fx.ts. Package requirements: lucide-react, motion.

What props customize FX Send Receive?

FX Send Receive accepts `from`, `to`, `quote`, `expected`, `expectedLabel`. Configures wire transfer, swift, fx behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of fx-send-receive?

Arithmetic on the quote you pass in; it does not fetch live rates or fees. Intermediary deductions are an estimate from your quote's maximum, not what banks will actually take. Does not check the recipient's account details or sanctions screening Server requirement: Re-quote the rate and fees on the server and charge against that server quote, with an idempotency key on the transfer.

How does FX Send Receive meet accessibility guidelines?

Both amount fields have visible labels; the receive field gets aria-invalid when a warning applies. Charges choice is a radiogroup with roving tabindex and arrow-key navigation. Status line uses role=status; decorative icons are aria-hidden. Focus moves to the receive field after a fix that changes it. Animations are skipped under reduced motion. Minimizes errors: typed amount in you send instead of they receive, transfer arrived short.

Which components pair with FX Send Receive?