---
title: "Currency Swap Review"
description: "The steps after a person presses Review in a Currency Swap: a summary to confirm, the wallet step, each step of the run, and the receipt."
url: https://gelatinui.com/components/currency-swap-review
markdown_url: https://gelatinui.com/components/currency-swap-review.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/currency-swap-review"
version: "2026-11-12"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Currency Swap Review

> The steps after a person presses Review in a Currency Swap: a summary to confirm, the wallet step, each step of the run, and the receipt.

Page: https://gelatinui.com/components/currency-swap-review

## When to use it

Best for: The steps after Review in a Currency Swap, from the summary to the receipt.

- Use it inside a Currency Swap with `confirm="review"`: a dialog on wide screens and a drawer on phones.
- Use `CurrencySwapStatus` and `CurrencySwapReceipt` under the form for the inline confirm modes.

## When not to use it

- For a plain yes or no question, use an [Alert Dialog](https://gelatinui.com/components/alert-dialog.md).
- For the form itself, use [Currency Swap](https://gelatinui.com/components/currency-swap.md).

## Notes for agents

- Parts: `CurrencySwapReview` (the dialog), `CurrencySwapReviewSummary`, `CurrencySwapStatus`, and `CurrencySwapReceipt`. Each reads the Currency Swap root.
- The summary shows while the flow is `review`; the status shows the wallet, the steps, the slow note, and the refused or failed end with Edit swap and Retry.
- Past `slowAfterMs` (default 120000) the status says the swap takes longer.
- The receipt shows paid, received, fee, network cost, reference, and time, with View on explorer and New swap.
- The dialog glides to the height of each step and closes on Cancel or after the end.

## Anatomy

```text
CurrencySwapReview
├─ CurrencySwapReviewSummary (0..n)
├─ CurrencySwapStatus (0..n)
└─ CurrencySwapReceipt (0..n)
```

## API reference

### CurrencySwapReview

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | The body. Default: the summary while it waits for the confirm, then Status, then Receipt. |
| `className` | `string` |  |  |
| `container` | `DialogContentProps["container"]` |  | Where the popup portals to (Base UI `Portal` `container`). Default: the root's `container`. |

### CurrencySwapReviewSummary

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### CurrencySwapStatus

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### CurrencySwapReceipt

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| CurrencySwapReview | `currency-swap-review` |  |  |  |
| CurrencySwapReviewSummary | `currency-swap-review-summary` |  |  |  |
| CurrencySwapStatus | `currency-swap-status` |  |  |  |
| CurrencySwapReceipt | `currency-swap-receipt` |  |  | `status-colors` |

## Usage

Put the Review after Submit, and place the summary, the status, and the receipt inside it in the order people see them.

The sample also uses `currency-swap`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/currency-swap-review @gelatin-ui-pro/currency-swap
```

```tsx title="swap-with-review.tsx"
import {
  CurrencySwap,
  CurrencySwapField,
  CurrencySwapSubmit,
  CurrencySwapSwitch,
} from "@/components/pro/finance/currency-swap";
import {
  CurrencySwapReceipt,
  CurrencySwapReview,
  CurrencySwapReviewSummary,
  CurrencySwapStatus,
} from "@/components/pro/finance/currency-swap-review";
import type { Asset } from "@/lib/asset-model";
import type { Quote, QuoteRequest, SwapOrder } from "@/lib/pro/currency-swap-model";

const ASSETS: Asset[] = [
  { id: "eur", kind: "fiat", code: "EUR", name: "Euro", decimals: 2, country: "EU" },
  { id: "usd", kind: "fiat", code: "USD", name: "US Dollar", decimals: 2, country: "US" },
];

async function getQuote(request: QuoteRequest, signal: AbortSignal): Promise<Quote> {
  const response = await fetch(`/api/quote?amount=${request.amount}`, { signal });
  return (await response.json()) as Quote;
}

async function sendSwap(order: SwapOrder): Promise<void> {
  await fetch("/api/swaps", { method: "POST", body: JSON.stringify(order) });
}

export function SwapWithReview() {
  return (
    <CurrencySwap assets={ASSETS} getQuote={getQuote} onConfirm={sendSwap}>
      <CurrencySwapField side="pay" />
      <CurrencySwapSwitch />
      <CurrencySwapField side="receive" />
      <CurrencySwapSubmit />
      <CurrencySwapReview>
        <CurrencySwapReviewSummary />
        <CurrencySwapStatus />
        <CurrencySwapReceipt />
      </CurrencySwapReview>
    </CurrencySwap>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/currency-swap-review
```

It adds 76 registry items: 73 files, 12635 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@xstate/react`, `clsx`, `country-flag-icons`, `decimal.js`, `motion`, `tailwind-merge`, `tailwind-variants`, `xstate`.

## Built on

- [Alert](https://gelatinui.com/components/alert.md)
- [Asset Icon](https://gelatinui.com/components/asset-icon.md)
- [Button](https://gelatinui.com/components/button.md)
- [Dialog](https://gelatinui.com/components/dialog.md)
- [Drawer](https://gelatinui.com/components/drawer.md)
- [Spinner](https://gelatinui.com/components/spinner.md)
- [Timeline](https://gelatinui.com/components/timeline.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Currency Swap](https://gelatinui.com/components/currency-swap.md)
- [Dialog](https://gelatinui.com/components/dialog.md)
- [Timeline](https://gelatinui.com/components/timeline.md)
- [Drawer](https://gelatinui.com/components/drawer.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Escape | Closes the review while it waits for the confirm. |

## Motion

| Part | Motion |
| --- | --- |
| Step change | theme · the dialog glides to the height of the new step |
| Status and receipt | panel · each folds open and closed under the form, on the shortest clock that keeps 15px a frame |
