Skip to Content
Kokonut UI

CD-06Cards

Currency Transfer

Transfer tracker that converts the amount in place, walks through each step on a filling rail and ends with a copyable reference.

Install with
lucide-react

Usage

With no props the card runs a demo: the payment is taken, converted, sent and arrives on its own. Pass status to drive it from your own transfer state. While status is "processing" the steps run up to the last one and wait there.

<CurrencyTransfer
  from={{ amount: 1200, currency: "GBP", symbol: "£", bank: "Monzo", last4: "1180" }}
  to={{ amount: 1404, currency: "USD", symbol: "$", bank: "Chase", last4: "4589", name: "Sam Carter" }}
  rate={1.17}
  txnId="TXN-8F2K19QZ"
  timestamp="2:30 PM"
  status={state}
  onRetry={retry}
/>

Status changes are announced to screen readers, and with reduced motion the digits, rail and ticks jump to their state.

PROOnboarding Checklist and more like it are in Kokonut UI Pro

Installation

Currency Transfer is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/currency-transfer.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/currency-transfer

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/currency-transfer.tsx.

npm install lucide-react

Props

from
TransferAccountDefault built-in

Sending account and amount.

to
TransferAccountDefault built-in

Receiving account and amount. Its name labels the card.

rate
numberDefault 0.92

Units of to.currency per one unit of from.currency.

txnId
stringDefault "TXN-DAB3UL494"

Transaction reference, copyable from the footer.

timestamp
stringDefault "10:45 AM"

When the rate was locked, e.g. "10:45 AM".

status
TransferStatus

Controlled status. While "processing" the steps run up to the last one and wait there. Leave unset for a demo that completes on its own.

locale
stringDefault "en-US"

BCP 47 locale for amounts, symbols and the rate.

onRetry
() => void

Shows a Retry button when the transfer has failed.

className
string

Extra classes for the root element.

TransferAccount

amountrequired
number

Amount sent from / received into this account.

currencyrequired
string

ISO currency code, e.g. "USD".

symbol
string

Short symbol, e.g. "$". Defaults to the currency's own symbol.

bankrequired
string

Bank or account name, e.g. "Chase Bank".

last4
string

Last digits of the account number, shown masked.

name
string

Account holder, shown on the receiving side, e.g. "Lena Fischer".

TransferStatus

type TransferStatus = "processing" | "completed" | "failed";

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.