Skip to content
Haze UI

Currency Transfer

A live international transfer progress card with recipient header, conversion summary, 4-step timeline, and copyable reference ID.

pnpm dlx shadcn@latest add @haze/currency-transfer
Open preview in a new tab
Livesmall script

When to use

  • Users track an active cross-border payout through payment, conversion, dispatch, and arrival milestones.
  • Locked exchange rate, recipient bank details, and transaction reference need to stay visible on a compact vertical card.

When not to use

  • Users need to enter an arbitrary amount and choose currencies from scratch. Use price-input or a form block instead.
  • Multiple historical payouts should be compared in rows. Use table.

Installation

Add the Haze registry to components.json once, then install Currency Transfer with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/currency-transfer
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
recipientNamestring"Lena Fischer"Full name of the payout recipient.
recipientBankstring"Deutsche Bank ··7823"Destination bank name and masked account suffix.
recipientInitialsstring–Optional avatar initials; derived from recipientName when omitted.
sentAmountnumber500Amount sent in the source currency.
sourceCurrencystring"USD"ISO 4217 currency code for the sent amount.
receivedAmountnumber460Converted amount delivered to the recipient.
targetCurrencystring"EUR"ISO 4217 currency code for the received amount.
transactionIdstring"TXN-DAB3UL494"Copyable transaction reference code shown in the card footer.
rateLockedAtstring"Rate locked 10:45 AM"Timestamp note showing when the conversion rate was locked.
statusLabelstring"In progress"Badge label shown while transfer milestones are pending.
completedLabelstring"Completed"Badge label shown once every step completes.
initialStepnumber1Zero-based active step index on initial render.
stepsTransferStep[]–Ordered transfer milestones with title and supporting detail.
headingLevel2 | 3 | 43Heading level for the recipient name.
classstring–Additional classes on the outer card.

Keyboard interactions

Tab then Enter or Space
Step through the transfer milestones, replay progress, or copy the transaction ID.

Accessibility

  • Step transitions and transaction ID copy feedback are announced via an aria-live polite status region.
  • The spinning progress indicator respects prefers-reduced-motion via motion-safe:animate-spin.
  • Without JavaScript, all four transfer steps, conversion totals, and the transaction reference render legibly.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Currency Transfer" with `npx shadcn@latest add @haze/currency-transfer`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import CurrencyTransfer from "@/components/haze/ui/currency-transfer.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/ui/currency-transfer.md

  • Customize with real content

    Adapt the Haze currency-transfer ui for our product. Replace the demo values of these props with our real content: recipientName, recipientBank, recipientInitials, sentAmount, sourceCurrency, receivedAmount, targetCurrency, transactionId, rateLockedAt, statusLabel, completedLabel, initialStep, steps, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: Step transitions and transaction ID copy feedback are announced via an aria-live polite status region. The spinning progress indicator respects prefers-reduced-motion via motion-safe:animate-spin. Without JavaScript, all four transfer steps, conversion totals, and the transaction reference render legibly. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using currency-transfer, check it fits: use it when users track an active cross-border payout through payment, conversion, dispatch, and arrival milestones.; locked exchange rate, recipient bank details, and transaction reference need to stay visible on a compact vertical card.. Avoid it when users need to enter an arbitrary amount and choose currencies from scratch. use price-input or a form block instead.; multiple historical payouts should be compared in rows. use table.. Alternatives: @haze/price-input, @haze/card, @haze/timeline.

Dependencies

  • npm: @lucide/astro
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog