Currency Transfer - React Component | Kokonut UI
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:
Add the currency-transfer component from Kokonut UI to this project with npx shadcn@latest add https://kokonutui.com/r/currency-transfer.json, then show me how to use it.
Transfer arrived. 460.00 EUR to Lena Fischer.
Lena Fischer
Deutsche Bank ••7823
Status: In progress
Amount: 460.00 EUR
Fee: $€001234567890012345678900123456789.00
500.00 USD sent · 460.00 EUR received
- Payment received
From Chase ••4589 - Converted to EUR
1 USD = 0.9200 EUR - Sent to Deutsche Bank
Deutsche Bank ••7823 - Arrived
Lena Fischer can use it now
Transaction ID: TXN-DAB3UL494
Rate locked: 10:45 AM
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.
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 above into components/kokonutui/currency-transfer.tsx.
npm install lucide-react
Props
from
TransferAccount Default: built-in
Sending account and amount.
to
TransferAccount Default: built-in
Receiving account and amount. Its name labels the card.
rate
number Default: 0.92
Units of to.currency per one unit of from.currency.
txnId
string Default: "TXN-DAB3UL494"
Transaction reference, copyable from the footer.
timestamp
string Default: "10:45 AM"
When the rate was locked.
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
string Default: "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
amount(required)numberAmount sent from / received into this account.
currency(required)stringISO currency code, e.g. "USD".
symbolstringShort symbol, e.g. "$".
bank(required)stringBank or account name, e.g. "Chase Bank".
last4stringLast digits of the account number, shown masked.
namestringAccount holder, shown on the receiving side, e.g. "Lena Fischer".
TransferStatus
type TransferStatus = "processing" | "completed" | "failed";
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react |
^0.556.0 |
npm, installed by the CLI |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.